Re:Jsonpath – a query language for JSON in Postgres [pdf]
by Kip9000 on Saturday May 18, 2019 @06:45PM
(#19950136)
Looks like an inferior subset of XPath which is much cleaner and powerful
[ Parent
| on HN ]
Re:Jsonpath – a query language for JSON in Postgres [pdf]
by klodolph on Saturday May 18, 2019 @07:09PM
(#19950230)
Isn't XPath for XML? How would you use it with JSON?
Re:Jsonpath – a query language for JSON in Postgres [pdf]
by thechao on Saturday May 18, 2019 @10:49PM
(#19951130)
Xpath’s relationship to XML is like CSS to HTML: its natural domain—and most common use—is XML. However, it is a general path selection/query mechanism with a UNIX-file-path-like syntax.
Re:Jsonpath – a query language for JSON in Postgres [pdf]
by theamk on Saturday May 18, 2019 @10:56PM
(#19951157)
There are large parts of XPath which are XML specific, like attributes or namespaces or node names (JSON’s arrays of arrays have neither). I am sure with enough effort one could use Xpath for generic JSON queries, but this will require non-obvious redesign of the language.