Andrew,

I think the discussion started with a wrong assumption: that JSON is used 
primarily in Javascript, and then went on
to see if JS will survive. Honestly I do not know, nor do I care. 

JSON will survive, I think.

That's certainly not true anymore that JSON is used only in JS.

Look at MongoDB. They have about 200K downloads a month, and people use all 
their language bindings
(I don't even think JS is in top, .... I would be curious about that...)

And with this huge demand, their support for serious querying is lacking. Their 
query language is very restricted
and kind of hacky.
http://docs.mongodb.org/manual/reference/operator/

Look how a query on JSON data could look like if they would use XQuery 
principles:

{|
  for $store in collection("stores")
  let $state := $store.state
  group by $state
  return {
    $state : {|
      for $product in collection("products")
      let $category := $product.category
      group by $category
      return {
        $category : {|
          for $sales in collection("sales")
          where (some $s in $store
                satisfies $sales."store number" eq $s."store number")
            and (some $p in $product
                satisfies $sales.product eq $p.name)
          let $pname := $sales.product
          group by $pname
          return { $pname : sum( $sales.quantity ) }
        |}
      }
    |}
  }
|}

(that's a creating a triple nested JSON object)

Sounds familiar and elegant, isn't it !?
(BTW, that's JSONiq http://www.jsoniq.org/)

Why in the world would the XQuery community NOT help the JSON community use 
what they have, given that
(1) it's totally applicable and
(2) it is good, powerful and elegant.

Huh !?

Best
Dana





On May 21, 2013, at 4:30 AM, Andrew Welch wrote:

>> On xml-dev there was a long discussion about this and someone said this very 
>> intelligent thing:
>> "the Web ignored XML because XML ignored the Web".
> 
> I don't get it - the language of the browser is javascript, and its
> easy to process json in javascript.... The back end could well be xml,
> but the server -> client communication is always going to be json
> while the processing language is javascript - what's the problem with
> that?
> 
> 
> -- 
> Andrew Welch
> http://andrewjwelch.com
> _______________________________________________
> [email protected]
> http://x-query.com/mailman/listinfo/talk

_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to