XQuery for JSON
JSON is now being used in many of the same environments as XML, and a variety of JSON query languages are emerging, including MongoDB's BSON, IBM's jaql, and CouchDB and Sqlite's UnQL. JSONiq is a query language based on XQuery, which makes it easy for an XQuery processor to support JSON in the same environments that currently use XQuery.
For environments that do not need XML, JSONiq defines a profile that uses only JSON. This profile is much simpler than XQuery, and easier to optimize. For environments that need to process both XML and JSON, JSONiq defines a profile that can produce or consume any combination of JSON, XML, or HTML.