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

Consider using JSON pointers #9

Closed
pyfisch opened this issue Sep 27, 2015 · 1 comment
Closed

Consider using JSON pointers #9

pyfisch opened this issue Sep 27, 2015 · 1 comment

Comments

@pyfisch
Copy link
Contributor

pyfisch commented Sep 27, 2015

JSON values provide a convenience to look up nested values called Value.lookup. The path is given separated by dots. It is impossible to escape dots in key names with the current method. I propose to use JSON pointers as described in RFC6901 as they provide a standard way to access nested values.

If you want to use JSON pointers I can also implement the change.

@erickt
Copy link
Member

erickt commented Feb 27, 2016

A belated sure! That would be awesome!

homu added a commit that referenced this issue May 12, 2016
feat(value): implement RFC6901 JSON Pointer

Add a method `pointer(&str)` to `Value`. Deprecate `lookup(&str)`.
Bump version to 0.7.1.

Closes #9

Notes:
* It should be possible to add a `pointer_mut(&str)` method to Value. This would allow to add and modify values. (Maybe even a delete method) I failed to add such a method because of borrow checker.
* Should [RFC6902 JSON Patch](https://tools.ietf.org/html/rfc6902) be implemented or is this something for a separate crate? (Patch is based on Pointer)
homu added a commit that referenced this issue May 13, 2016
feat(value): implement RFC6901 JSON Pointer

Add a method `pointer(&str)` to `Value`. Deprecate `lookup(&str)`.
Bump version to 0.7.1.

Closes #9

Notes:
* It should be possible to add a `pointer_mut(&str)` method to Value. This would allow to add and modify values. (Maybe even a delete method) I failed to add such a method because of borrow checker.
* Should [RFC6902 JSON Patch](https://tools.ietf.org/html/rfc6902) be implemented or is this something for a separate crate? (Patch is based on Pointer)
@homu homu closed this as completed in #41 May 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants