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
JsonPointer is compatible with non escaped characters~, but this compatibility fails when~is located at the end of FieldName and followed by /. Here is a simple example
public static void main(String[] args) {
ObjectMapper om = new ObjectMapper();
ObjectNode jo = om.createObjectNode();
ArrayNode nums = om.createArrayNode().add(0).add(1);
jo.set("num~s",nums);
JsonPointer jp = JsonPointer.compile("/num~s/0");
System.out.println(jo.at(jp)); //print 0
jo.remove("num~s");
jo.set("nums~",nums);
jp = JsonPointer.compile("/nums~");
System.out.println(jo.at(jp)); //print [0,1]
jo.remove("num~s");
jo.set("nums~",nums);
jp = JsonPointer.compile("/nums~/0");
System.out.println(jo.at(jp).isMissingNode()); // is missingNode
}
The text was updated successfully, but these errors were encountered:
JsonPointer is compatible with non escaped characters~, but this compatibility fails when~is located at the end of FieldName and followed by /. Here is a simple example
The text was updated successfully, but these errors were encountered: