JSON Query discussion group
- For those who might be interested, I have started new a Google
group/mailing list for the continued development of a language/syntax
for JSON querying:
This group's purpose is to discuss, evolve, and create a specification
for JSON querying, building on existing designs to provide robust
comprehensive language for searching and retrieving information from
JSON-style object-oriented data structures.
The goals for the JSON Query language can be found at:
and are listed below:
* Build on JSONPath <http://goessner.net/articles/JsonPath/> - The
most popular existing format for retrieving data from JSON
structures is JSONPath. JSONPath has numerous implementations, and
we wish to build on these.
* Progressive operator evaluation -
o Queries can be evaluated by left-to-right execution of
operators, reducing the complexity of implementations.
o The query language can be used a query format with URIs for
RESTful querying of data. It should be possible to postpend
a query to a URI to indicate a query into the data/resource
referred by the URI.
o The query syntax should be suitable as query component in
the URI and provide alternate to
application/x-www-form-urlencoded for encoding more complex
queries. The query format could potentially be a MIME type
retain maximum interoperability with the language itself, with
constructs that could potentially be included in future ECMAScript
* Language independence - The query language should have the
semantics regardless of the underlying platform or framework.
* Safely executable - It should be possible to evaluate queries from
untrusted sources without undue risk of exposing oneself to
* Comprehensive querying capabilities:
o Filter collections
o Sorting results
o Expressions with the ability to use object properties, array
indexes, basic comparison operators, boolean operators, and
finding matches within arrays.
o Aggregate/group data and process it with collection
reduction operations such as sum, maximum, minimum
o Recursive search
o Full text search
o Create results of distinct sets, eliminating duplicates
Current and Proposed Efforts
Efforts have been made to create a query language that meet the
requirements of this group with JSONQuery
which has been implemented in Dojo
Persevere <http://docs.persvr.org/documentation/jsonquery>, and a
<http://github.com/JasonSmith/jsonquery/tree/master>. Other efforts
include Jaql <http://www.jaql.org/release/0.1/jaql-overview.html>, but
this does not meet the requirements of the specification. The current
JSONQuery syntax meets the majority of these goals but there are still
additional constructs that are needed for more comprehensive querying
capabilities. Missing capabilities include array matching, aggregation,
full text search, and distinct sets.
[Non-text portions of this message have been removed]
- Hi Kris! I think this is a good group to have. :)
One quick question: I was wondering about naming of the effort.
To me, "Path" and "Query" imply somewhat different (but overlapping)
* Path leaning towards traversal and selection of nodes, similar to
* Query seems more oriented towards aggregate operations (SQL, XQuery, Jaql)
Others may have different connotations with these terms.
But given the description of goals, it seems to me that the effort
would be more geared for defining a Path language, and not Query
Am I totally off here? I just wonder if naming might lead people to
read too much into the effort; even if actual goals are clearly
-+ Tatu +-