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

RFC 6901 (JSON Pointer) support #218

Closed
erosb opened this issue Apr 12, 2016 · 8 comments
Closed

RFC 6901 (JSON Pointer) support #218

erosb opened this issue Apr 12, 2016 · 8 comments

Comments

@erosb
Copy link
Contributor

erosb commented Apr 12, 2016

What do you think about adding JSON Pointer support to the library?

From the API point of view I think it would mean a new method with a signature like Object query(String jsonPointer), both in JSONObject and JSONArray.

@stleary if you give green light for this proposal then I may work on it.

@johnjaylward
Copy link
Contributor

is this like XML Path but for JSON?

@erosb
Copy link
Contributor Author

erosb commented Apr 12, 2016

Exactly (and simpler too).

@stleary
Copy link
Owner

stleary commented Apr 13, 2016

Torn between liking the idea and thinking maybe it is not part of the purpose of the lib. Hard to decide because I am not familiar with it - I use JsonPath in the unit tests. JsonPointer does not seem to have wildcards. Is this the case?

@erosb
Copy link
Contributor Author

erosb commented Apr 13, 2016

I've never used JsonPath, but it doesn't seem to be a standard, so I would still prefer implementing JSON Pointer. JsonPath also seems to be a more complex language, deserving its own library, while a JSON Pointer implementation would be small-enough to fit into only a few methods in this project.

@stleary
Copy link
Owner

stleary commented Apr 16, 2016

Please proceed with JSON Pointer if you are still interested. Let's see what it would look like.

@stleary
Copy link
Owner

stleary commented Apr 28, 2016

Please see #222

@stleary stleary closed this as completed Apr 28, 2016
@erosb
Copy link
Contributor Author

erosb commented Apr 28, 2016

@stleary will youl merge #222 ?

@stleary
Copy link
Owner

stleary commented Apr 28, 2016

@erosb I expect so. The implementation looks good so far. Have not had a chance to go over the unit test cases or coverage yet.

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

No branches or pull requests

3 participants