[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: The JSON Data Interchange Format (ECMA standard, October 2

  • From: Ghislain Fourny <g@28.io>
  • To: Michael Kay <mike@saxonica.com>
  • Date: Fri, 18 Oct 2013 09:50:25 +0200

Re:  The JSON Data Interchange Format (ECMA standard
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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.