Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling testing for a pointer that references a nonexistent value #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zmarois
Copy link

@zmarois zmarois commented May 16, 2018

Thanks for hosting this repo. This is the same as java-json-tools#41

We are trying to write a JSON Patch test operation that asserts the value at a path is not set.

Per the "Error Handling" section of the RFC on JSON Pointers:

Error conditions include, but are not limited to:

  • Invalid pointer syntax
  • A pointer that references a nonexistent value

This specification does not define how errors are handled. An application of JSON Pointer SHOULD specify the impact and handling of each type of error.

For example, some applications might stop pointer processing upon an error, while others may attempt to recover from missing values by inserting default ones.

A JSON Patch test operation can only test that evaluating a JSON pointer results in a specified value. I would like to consider that processing a JSON Pointer for the application of a JSON Patch test operation would evaluate a nonexistent value as null, at least when comparing to null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant