Skip to content

should throw JSONPointer:: containsValue an Exception if root or intermediate value not exists #119

@sebastian-toepfer

Description

@sebastian-toepfer

The spec doesn't say anything what jsonpointer.containsValue should do if the root or intermediate property not exists in target. But it felt wrong for an exception to be thrown, in my opinion it should just return false.

code says more than a thousand words:

boolean contains = Json.createPointer("/test/value")
  .containsValue(Json.createObjectBuilder().add("value");

should not throw any exception it makes containsValue in my opinion useless.

if you agree with it I will try to provide a pr to solve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions