3 ms·
> JSON is used as a query language Maybe a little more accurate to say JSON is used as a base layer for the query language. JSON is "JavaScript Object Notatio
by marshray 14y ago
> JSON is used as a query language
Maybe a little more accurate to say JSON is used as a base layer for the query language.
JSON is "JavaScript Object Notation". But the "meaning" of the query is in the objects being denoted, not the notation used to represent them as text. So comparing Mongo's use of JSON to SQL is apples-to-oranges.
We could encode SQL as JSON too:
{"query": "SELECT * FROM things;"}
or
{"query": [
{"SELECT": "*"},
{"FROM": "things"} ] }
without affecting the expressive power of the SQL language one bit.