Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It probably should not invent its own language or if it does, it should take inspiration from XPath/JSONPath which is arguably simpler.


I agree. Modern SQL supports JSONPath. Postgresql 12 has support for it. A lot of people are/will be familiar with it.


Be careful with terminology: the thing defined in SQL:2016 is called the SQL/JSON path language, and although it’s similar to the older JSONPath, it’s not the same.

PostgreSQL also calls the SQL/JSON path language “JSON Path”, and the data type is called `JSONPATH`.


Thanks for the clarification! I guess it would make a lot of sense for a tool such as jtc to use SQL/JSON path language then. I'm sure it'll be the most common JSON query language soon.


> JsonPath has some drawbacks, such as a lack of operators for reaching parent or sibling nodes, -- https://www.baeldung.com/guide-to-jayway-jsonpath

Unfortunately, ".." just doesn't fit nicely with the "." operator of C-style languages.

I'm almost inclined to go full-XPath, and use "/", so I can use "..".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: