You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Does sonic-cpp support merge-patch easily?
For example : { op: replace, patch : "Object/0/New_object", value : "123" }
If use json_pointer:
sonic_json::Node* node2 = doc.AtPointer(PointerType({"Object", 0, "New_object"}));
This doesn't format well. transfer patch : "Object/0/New_object" to {"Object", 0, "New_object"}
The text was updated successfully, but these errors were encountered:
Are you discuss about jsonpointer rfc, for example, "/Object/0/New_object" follows jsonpointer rfc.
We will support the RFC in the future.
However, parsing “Object/0/New_object” hurts performance, and it can be easily rewritten as {"Object", 0, "New_object"}, so, we suggest using the existing format like {"Object", 0, "New_object"}.
Are you discuss about jsonpointer rfc, for example, "/Object/0/New_object" follows jsonpointer rfc.
We will support the RFC in the future.
However, parsing “Object/0/New_object” hurts performance, and it can be easily rewritten as {"Object", 0, "New_object"}, so, we suggest using the existing format like {"Object", 0, "New_object"}.
Yes, I am talking about jsonpointer rfc.
For current code, How to rewritten as {"Object", 0, "New_object"}? just split string by '/' ? But how to handle string to int automatic?
Can you give me some example?
This is not just a matter of splitting strings by '/', you need to refer to the RFC to distinguish the escape characters. and you can refer to the rapidjson.
Hi,
Does sonic-cpp support merge-patch easily?
For example : { op: replace, patch : "Object/0/New_object", value : "123" }
If use json_pointer:
sonic_json::Node* node2 = doc.AtPointer(PointerType({"Object", 0, "New_object"}));
This doesn't format well. transfer patch : "Object/0/New_object" to {"Object", 0, "New_object"}
The text was updated successfully, but these errors were encountered: