Hi Johannes,
Many thanks for your feedback.
If I correctly understand, you are comparing the following two alternatives:
1. Enriching the data model with new items (objects and arrays). This is what we call the JDM (JSONiq Data Model).
vs.
2. Reuse the existing XDM data model, and map (parse) JSON syntax to, say, XML elements in a special way.
I think there are several mappings that were designed that do the JSON->XML (or XDM) conversion. Indeed, you can then use the power of the XPath syntax. I think Zorba has (or at least had at some point) functions to do that. Both approaches make sense to me.
We consciously took approach 1 in JSONiq. Our rationale was the following:
- We think JSON deserves to be a first-class-citizen in the NoSQL world, just like XML. Many databases, like MongoDB, are JSON (or BSON)-focused.
- JSONiq now designates a language that was forked from XQuery and that specifically addresses JSON querying (no XML in its core). Having a JDM is logical in that respect -- even though both JSONiq (extended with XQuery) and XQuery (extended with JSONiq) can do XML and JSON simultaneously.
- The main attribute of JSON is (I think) its simplicity -- probably, or partly, because it is data-oriented, whereas XML also covers the document-oriented space (publishing, books, XHTML...). JSONiq with JSON support only is simpler than XQuery.
- It comes at the cost of a much simpler navigation syntax (no going back to the parent, ...), but I am tempted to say "it's not a bug, it's a feature", or at least a design feature :-) Since it is Turing-complete, one can always write function libraries that provide a more complex and powerful navigation experience, possibly with an optimizer under the hood.
- We are currently fine-tuning the JSONiq navigation syntax. While it will not add any complexity, we think it will give it a feeling a wee bit closer to XPath.
I hope it makes sense?
Kind regards,
Ghislain
On Jun 13, 2013, at 10:51 AM, Johannes Lichtenberger <
lichtenberg...@gmail.com>
wrote:
> --
> You received this message because you are subscribed to the Google Groups "JSONiq" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
jsoniq+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>