<story><title>Fat JSON</title><url>https://www.tbray.org/ongoing/When/201x/2014/05/05/Fat-JSON</url></story><parent_chain><item><author>drachel</author><text>I&amp;#x27;m a little surprised not to hear any mention of JSON Pointer (RFC 6901).  It deals with exactly this:&lt;p&gt;&lt;a href=&quot;http://tools.ietf.org/html/rfc6901&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;tools.ietf.org&amp;#x2F;html&amp;#x2F;rfc6901&lt;/a&gt;&lt;p&gt;With JSON Pointer syntax, it would be something like:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    JWalk.getStringPtr(user, &amp;quot;&amp;#x2F;them&amp;#x2F;public_keys&amp;#x2F;primary&amp;#x2F;bundle&amp;quot;);
&lt;/code&gt;&lt;/pre&gt;
It&amp;#x27;s concise, complete&amp;#x2F;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.</text></item></parent_chain><comment><author>timbray</author><text>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 &lt;i&gt;any&lt;/i&gt; syntax is a win; an list of strings is an excellent selector that hits an 80&amp;#x2F;20 point &amp;amp; meets all my needs.</text></comment>
<story><title>Fat JSON</title><url>https://www.tbray.org/ongoing/When/201x/2014/05/05/Fat-JSON</url></story><parent_chain><item><author>drachel</author><text>I&amp;#x27;m a little surprised not to hear any mention of JSON Pointer (RFC 6901).  It deals with exactly this:&lt;p&gt;&lt;a href=&quot;http://tools.ietf.org/html/rfc6901&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;tools.ietf.org&amp;#x2F;html&amp;#x2F;rfc6901&lt;/a&gt;&lt;p&gt;With JSON Pointer syntax, it would be something like:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    JWalk.getStringPtr(user, &amp;quot;&amp;#x2F;them&amp;#x2F;public_keys&amp;#x2F;primary&amp;#x2F;bundle&amp;quot;);
&lt;/code&gt;&lt;/pre&gt;
It&amp;#x27;s concise, complete&amp;#x2F;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.</text></item></parent_chain><comment><author>mpk</author><text>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.</text></comment>