Closed
Description
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 itselfJsonPointer.compile("")
would match the String valuetext
However: currently (as of 2.13), empty JsonPointer
:
- Returns '""' for
getMatchingProperty()
- Retuns
true
formayMatchProperty()
- 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.
Metadata
Metadata
Assignees
Labels
No labels