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
Currently the "empty" JsonPointer instance (obtained by JsonPointer.empty() or trying to compile empty String (zero-length)) is distinct from one that matches empty property name, /, regarding behavior.
Empty JsonPointer matches the current node whereas one with "empty property" would match value of JSON Object with empty String. Specifically, for JSON Object like:
{ "" : "text" }
JsonPointer.empty() would match JSON Object itself
JsonPointer.compile("") would match the String value text
However: currently (as of 2.13), empty JsonPointer:
Returns '""' for getMatchingProperty()
Retuns true for mayMatchProperty()
But does NOT actually match with matchProperty("")
Of these, first 2 cases should be fixed.
It is understood that there may be backwards-compatibility challenges in changing the behavior: however, handling of the "empty" JsonPointer is important for proper handling of traversal.
The text was updated successfully, but these errors were encountered:
cowtowncoder
changed the title
JsonPointer.empty() should NOT indicate match of a propertyJsonPointer.empty() should NOT indicate match of a property with key of ""
Jul 3, 2022
Currently the "empty"
JsonPointer
instance (obtained byJsonPointer.empty()
or trying to compile empty String (zero-length)) is distinct from one that matches empty property name,/
, regarding behavior.Empty
JsonPointer
matches the current node whereas one with "empty property" would match value of JSON Object with empty String. Specifically, for JSON Object like:JsonPointer.empty()
would match JSON Object itselfJsonPointer.compile("")
would match the String valuetext
However: currently (as of 2.13), empty
JsonPointer
:getMatchingProperty()
true
formayMatchProperty()
matchProperty("")
Of these, first 2 cases should be fixed.
It is understood that there may be backwards-compatibility challenges in changing the behavior: however, handling of the "empty"
JsonPointer
is important for proper handling of traversal.The text was updated successfully, but these errors were encountered: