XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] The JSON Data Interchange Format (ECMA standard, October 2013)

Hi,

I can only agree with Mike that the impedance mismatch between "flat sequences" and "nestable arrays" is a challenging issue. Many proposals to integrate them have been made by several people (including changes to the data model, updated semantics of FLWOR expressions, ...), with different compromises between usability, soundness and elegance, and each and every one of them still had characteristics that prevented the reach of a consensus.

When designing JSONiq, we took a conservative approach from the beginning, and circumvented the issue by keeping the separation between sequences and arrays explicit. Arrays correspond to JSON arrays and are items, and sequences remain the "top-level streaming construct" of the language with the same behaviour as XQuery. You can turn ("unbox") an array into a sequence with $array[], and you can turn ("box") a sequence into an array with [ $sequence ]. Our experience so far was rather positive and we did not have to come back on this design.

Kind regards,
Ghislain


On Oct 18, 2013, at 8:58 AM, Michael Kay <mike@saxonica.com> wrote:

>> 
>> Finally, since JSON is reality, why not use the power of XQuery on
>> processing it by JSONiq?
>> 
> 
> Because of the impedence mismatch. Query languages and data models go hand-in-glove. In XDM a string is the same thing as a list containing a single string, in the JSON model it isn't. Papering over that crack is remarkably difficult, because it turns out that the whole semantics of FLWOR expressions depend on that assumption. We've spent about three years trying to solve that one, without much success.
> 
> (In my FtanML paper at Balisage I took a different approach: new data model, new query language).
> 
> Michael Kay
> Saxonica
> _______________________________________________________________________
> 
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
> 
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS