News for hackers. Stuff that matters.
Re:JSONSelect by zdw on Saturday May 21, 2011 @10:44AM (#2570937)
My prediction is that JSON will eventually reach feature parity with XML (this is quite similar to XPath), then we'll dump it for YAML or something.

Great.

Re:JSONSelect by wvenable on Saturday May 21, 2011 @11:44AM (#2571026)
JSON is almost the simplest untyped text-based tree serialization format that could possibly be designed. In terms of complexity, XML and YAML are closer together.
Re:JSONSelect by arethuza on Saturday May 21, 2011 @01:27PM (#2571210)
I'd argue that Lisp s-expressions are simpler.
Re:JSONSelect by sambeau on Saturday May 21, 2011 @03:08PM (#2571464)
S-expressions can contain code. Json expressions are data only.
Re:JSONSelect by Ixiaus on Saturday May 21, 2011 @06:38PM (#2571940)
It isn't that S-expressions can contain code, it's that they are so simple that based on a very simple syntactical rule set certain tokens can be interpreted as code or data and because of that you can easily "tokenize" pieces of "code" to make it "data" and vice versa (that's a really flexible feature). Kind of notable that S-expressions are an integral part of the language and not just a "data format" of the language...
Re:JSONSelect by prodigal_erik on Saturday May 21, 2011 @07:16PM (#2572044)
You could easily invent a programming language expressed in JSON literals, it just wouldn't be quite the same as javascript. I'd argue that sexprs are simpler because they only use one container type (alists and plists are merely conventions, not baked into the grammar). However, JSON's omission of the symbol/string distinction is one argument the other way.
Re:JSONSelect by pnathan on Sunday May 22, 2011 @12:02AM (#2572577)
That might be a slightly amusing syntactical overlay on Common Lisp. Hash-tables are a bit manky to deal with directly IMO; setting up a reader macro in JSON-esque syntax might be quite usable.
Re:JSONSelect by prodigal_erik on Sunday May 22, 2011 @03:27AM (#2572848)
Oddly enough, Steele pretty much already did this as a readtable example in his classic manual (based on xappings and xets from Connection Machine Lisp): http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node192.html#X...
Re:JSONSelect by pnathan on Monday May 23, 2011 @02:09AM (#2575112)
yeah, I noticed that as I worked on implementing the idea last night. :-)
Re:JSONSelect by Ixiaus on Saturday May 21, 2011 @10:31PM (#2572439)
Yes, you can, probably not too different in nature to Racket's syntactical sugar with using "[" (square brackets) to make reading the LISP code easier... And yes, your argument for their simplicity is actually what I was trying to express (much less successfully than you did).
Re:JSONSelect by sambeau on Saturday May 21, 2011 @10:27PM (#2572432)
True. I withdraw.
Re:JSONSelect by maxtilford on Saturday May 21, 2011 @04:11PM (#2571628)
That S-expressions can/often contain code doesn't make them more complicated when used for data only. Anything can contain code.
Re:JSONSelect by Macha on Saturday May 21, 2011 @06:10PM (#2571881)
A large amount of JSON is actually valid YAML.
Re:JSONSelect by Ixiaus on Saturday May 21, 2011 @06:31PM (#2571932)
I doubt it ever will. The reason why I use JSON is because it's a very simple data format; when I need more expressive and structured data interchange I always fallback on XML+XSD+XSLT - something JSON will probably never catch up with (because that already exists and why make JSON needlessly complex in order to handle what that kind of stack does?).

I think web developers get caught up in bashing XML a lot for no good reason - just because it isn't directly applicable to a simple RESTful API doesn't mean it isn't incredibly useful, it's meant for machines anyway!

Re:JSONSelect by true_religion on Sunday May 22, 2011 @04:24AM (#2572903)
XMLs great promise was that it was human readable. Lo and behold, it is more readable by non-bit-addled humans than whatever binary format is used in COBRA RPC.

But no, XML wasn't meant for machines... its just that people today programatically generate and consume XML far more often than they do it by hand.