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 ex… #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zmarois
Copy link

@zmarois zmarois commented Jan 19, 2017

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.

}
]
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this newline is very important for windows 98 json parsers

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.

2 participants