I was searching on this same feature recently. There does not seem to be a standard or ubiquitous implementation for referencing in JSON. I found a couple of resources that I can share:
- The Future for JSON Referencing
http://groups.google.com/group/json-schema/browse_thread/thread/95fb4006f1f92a40 – This is just a discussion on id-based referencing.
- JSON Referencing in Dojo
http://www.sitepen.com/blog/2008/06/17/json-referencing-in-dojo/ – An implementation in Dojox (extensions for the Dojo framework) – discusses id-based and path based referencing.
- JSONPath – XPath for JSON
http://goessner.net/articles/JsonPath/ – This seems to be an attempt at establishing a standard for path based JSON referencing – maybe a small subset of XPath (?). There seems to be an implementation here but I kept getting errors on the download section – you might have better luck. But again this is no where close to a standard yet.