3 ms·
Interesting that they're using JSONPath, which isn't even specified formally anywhere. The only other major implementor that I know about is Kubernetes, which h
by lobster_johnson 10y ago
Interesting that they're using JSONPath, which isn't even specified formally anywhere. The only other major implementor that I know about is Kubernetes, which has some odd extensions for templating. (JSONPath itself, of course, isn't very well designed in the first place.)
We're working on a new variant of JSONPath that we're hoping to publish as a formal, comprehensive specification. It's essentially a superset of JSONPath with some syntax warts fixed (like the need to start with $). I wrote a little about it on HN a week ago [1].
[1] https://news.ycombinator.com/item?id=13032391 https://news.ycombinator.com/item?id=13032391
- JonnieCache 10y agoVery nice. Xpath is the saving grace of dealing with XML, so I'll definitely keep an eye on this.
- niftich 10y agoPerhaps the most formally specified JSON-addressing dense declarative syntax is JSON Pointer (RFC 6901), but it's very limited: it only has exact index selectors, an end-of-array selector, and an exact object name selector. Still, given how JSON-Patch (RFC 6902) depends on it, it may be worthwhile to pursue a notation that extends it formally.
- devj 10y agoIBM JSONata is another open source alternative. Check it out: https://developer.ibm.com/open/jsonata/ https://developer.ibm.com/open/jsonata/
- murukesh_s 10y agoJSONata - weird name but seems like a good alternative to XPath.