May also be interested in the `jq` CLI, which on first glance appears to use a similar but not identical query language. https://stedolan.github.io/jq/
JMESPath – A query language for JSON
21–30 of 131 posts
Re: JMESPath – A query language for JSON
#22The reinvention of XML in JSON is almost complete - JMESPath vs XPath, JSON Schema vs XML Schema etc. If you need semi structured data to that level, consider using XML instead - you can validate it, there's plenty of tools, it's very stable and mature etc
Is that a bad thing? For cases where the document is at least partially written by hand it makes sense to replace XML with something more friendly, such as JSON or YAML.
People shouldn't use JSON for anything hand-written. YAML or even the older INI format are way better suited for configuration files for one reason alone: they allow comments.
Re: JMESPath – A query language for JSON
#23The reinvention of XML in JSON is almost complete - JMESPath vs XPath, JSON Schema vs XML Schema etc. If you need semi structured data to that level, consider using XML instead - you can validate it, there's plenty of tools, it's very stable and mature etc
The fact that a solution is treading familiar ground does not invalidate its utility.
Re: JMESPath – A query language for JSON
#24Re: JMESPath – A query language for JSON
#25The reinvention of XML in JSON is almost complete - JMESPath vs XPath, JSON Schema vs XML Schema etc. If you need semi structured data to that level, consider using XML instead - you can validate it, there's plenty of tools, it's very stable and mature etc
But can you store XML in a database that is Web Scale?? /s
The "Web scale" is what MongoDB tried to sell (unfortunately, successfully), and it's not even close to being web scale.
Re: JMESPath – A query language for JSON
#26Re: JMESPath – A query language for JSON
#27Very simple standard and easy to implement, but not as powerful as jmespath nor jq.
Re: JMESPath – A query language for JSON
#28The reinvention of XML in JSON is almost complete - JMESPath vs XPath, JSON Schema vs XML Schema etc. If you need semi structured data to that level, consider using XML instead - you can validate it, there's plenty of tools, it's very stable and mature etc
Neither JSON schema or XML schema are particularly popular - and for good reason. Let's say you want to create a schema that limits field "country" to be limited to ISO 3166-1 country codes - either you:
* Keep that schema file updated by hand every time something like Sudan breaking in two happens (no).
* Write a program that generates the schema (seriously... no)
* Do schema validation in code where it belongs - pulling in relevant validation data from canonical sources, rather than some markup language invented by people who didn't have the imagination to consider a really common use case.
Re: JMESPath – A query language for JSON
#29May also be interested in the `jq` CLI, which on first glance appears to use a similar but not identical query language. https://stedolan.github.io/jq/
seconded. the jq language is surprisingly powerful and at first glance at jmespath, the syntax is similar.
[.locations[] | select(.state == "WA").name] | sort | join(", ") | { WashingtonCities: . }