5 ms·
It probably should not invent its own language or if it does, it should take inspiration from XPath/JSONPath which is arguably simpler.
by techie128 7y ago
It probably should not invent its own language or if it does, it should take inspiration from XPath/JSONPath which is arguably simpler.
- Rotareti 7y agoI agree. Modern SQL supports JSONPath. Postgresql 12 has support for it. A lot of people are/will be familiar with it.
- chrismorgan 7y agoBe 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`.
- Rotareti 7y agoThanks 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.
- hyperpallium 7y ago> JsonPath has some drawbacks, such as a lack of operators for reaching parent or sibling nodes, -- https://www.baeldung.com/guide-to-jayway-jsonpath 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 "..".