News for hackers. Stuff that matters.
Re:Fat JSON by drachel on Tuesday May 06, 2014 @08:50AM (#7704083)
I'm a little surprised not to hear any mention of JSON Pointer (RFC 6901). It deals with exactly this:

http://tools.ietf.org/html/rfc6901

With JSON Pointer syntax, it would be something like:

    JWalk.getStringPtr(user, "/them/public_keys/primary/bundle");
It's concise, complete/unambiguous, and has implementations in a growing number of environments, so I think it could be worth mentioning as an approach. It also defines a useful URL fragment syntax for referencing nodes within documents, which would be a good thing for the JSON world.
Re:Fat JSON by timbray on Tuesday May 06, 2014 @02:30PM (#7706267)
Oh dear, I’ve probably hurt some feelings for having missed 6901. Interesting that when I googled around for JSON analogues of XPath, I didn’t turn that up. Having said that, it’s not obvious that any syntax is a win; an list of strings is an excellent selector that hits an 80/20 point & meets all my needs.
Re:Fat JSON by tonyg on Tuesday May 06, 2014 @10:12AM (#7704526)
His omission of RFC 6901 is especially remarkable considering he is listed by name in that RFC's acknowledgements section as having contributed to the specification!
Re:Fat JSON by mpk on Tuesday May 06, 2014 @09:02AM (#7704138)
That works very well combined with RFC 6902 - JSON-PATCH for partial changes to JSON objects, which in turn works nicely with HTTP PATCH method, RFC 5789.
Re:Fat JSON by roberto on Tuesday May 06, 2014 @12:07PM (#7705310)
Shameless plug: I wrote a small JSON database the supports JSON Pointer and JSON Patch: https://bitbucket.org/robertodealmeida/jsonstore
Re:Fat JSON by dochtman on Tuesday May 06, 2014 @09:57AM (#7704443)
I wrote a comment pointing to 6901, but it's probably still in moderation.