Search the web
Sign In
New User? Sign Up
rest-discuss · REST Discussion Mailing List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
WADL pushback   Message List  
Reply | Forward Message #9520 of 14253 |
Re: [rest-discuss] Re: WADL pushback

A. Pagaltzis wrote:
> * Elliotte Harold <elharo@...> [2007-07-17 01:00]:
>> You're not supposed to put stuff arbitrary JavaScript into
>> JSON, but people can and do.
>
> Then it’s not JSON anymore and JSON parsers will choke on it.
> JSON is a computation-free subset of Javascript.
>

Crackers don't play by the rules. They do not send only well-formed
messages that adhere to the spec. Secure software has to be ready for
absolutely any input, not just input that follows the spec.

That XML is so complex that you really need a true parser to handle it
is a feature, not a bug. It discourages and mostly prevents the use of
porr quality, hand-written solutions to handle it. Even in the rare
cases where the solutions are hand-written, they're typically based on
non-Turing complete regex's. No one takes an arbitrary XML document and
throws it into a JavaScript interpreter. People do this with JSON all
the time, and the language was deliberately designed to make this possible.


--
Elliotte Rusty Harold elharo@...
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/



Sat Jul 21, 2007 12:31 pm

elharo@...
Send Email Send Email

Forward
Message #9520 of 14253 |
Expand Messages Author Sort by Date

... Then it’s not JSON anymore and JSON parsers will choke on it. JSON is a computation-free subset of Javascript. (If you wanted to parse it using `eval` in...
A. Pagaltzis
a22pag
Offline Send Email
Jul 17, 2007
12:39 am

... Crackers don't play by the rules. They do not send only well-formed messages that adhere to the spec. Secure software has to be ready for absolutely any...
Elliotte Harold
elharo@...
Send Email
Jul 21, 2007
12:31 pm

... That's an interesting premise. I think it has some validity, but there is a major consequence. there is effectively one XML parser for Java, Xerces, whose...
Steve Loughran
steve_loughran
Offline Send Email
Jul 30, 2007
1:28 pm

... You mean the spec is inconsistent and buggy but because it fits on one page it seems like it's simple on first pass? I hear a lot of the bugs in XMLRPC...
Jon Hanna
hack_poet
Offline Send Email
Jul 30, 2007
1:38 pm

... yep. But it also means you dont need to commit to a SOAP stack vendor, have a toolchain whose whole aim in life is to hide the incoming data, or rely on...
Steve Loughran
steve_loughran
Offline Send Email
Jul 30, 2007
2:05 pm

... Sure. All of the software I’ve written to date will spit stuff back out if it purports to be JSON but contains Javascript code. Because *none* of my code...
A. Pagaltzis
a22pag
Offline Send Email
Jul 30, 2007
4:19 pm

... Hahstables and arrays are both easy: <hashtable> <entry> <key>foo</key> <value>bar</value> <entry> </hashtable> <array> <entry>1<entry> <entry>45<entry> ...
Elliotte Harold
elharo@...
Send Email
Jul 12, 2007
9:05 am

... The problem with that is the mindboggling amount of indirection you have introduced. You have an element containing whitespace text nodes and elements, and...
A. Pagaltzis
a22pag
Offline Send Email
Jul 12, 2007
11:02 am

... Then problem being what? This is easy to suck into a Hashtable API if you like. The issue is the APIs, not the markup. JSON is a clever kludge designed to...
Elliotte Harold
elharo@...
Send Email
Jul 12, 2007
11:25 am

... JS 1.2 actually, not that it matters a whit. Sorry guys, but this back and forwards between the two of you reads like as if you're both arguing over...
Keith Gaughan
keithgaughan
Offline Send Email
Jul 12, 2007
12:37 pm

... See, I was thinking "vi vs. emacs," myself. Ever the nonconformist, I use pico. And nano, when I really need advanced features. *And* I drive a Toyota that...
Karen
karencravens
Offline Send Email
Jul 12, 2007
2:12 pm

... That *is* what I am saying. JSON is good for common data structures, and XML is good for documents. I am not saying JSON is good at everything, at all....
A. Pagaltzis
a22pag
Offline Send Email
Jul 12, 2007
9:08 pm

... For me, this paragraph is information-free. -- Robert Sayre "I would have written a shorter letter, but I did not have the time."...
Robert Sayre
robertsayre2000
Offline Send Email
Jul 12, 2007
2:10 pm

... Well, in fact, JSON is really just JavaScript literal syntax, co-opted for wider usage. I've never been a fan of JSON because you can (unsafely) eval() it...
Patrick Mueller
pmuellr
Offline Send Email
Jul 12, 2007
9:23 pm

... That’s not a feature, it’s a waste of time. When I reach for JSON I want to serialise a data structure. I have absolutely zero interest in modelling...
A. Pagaltzis
a22pag
Offline Send Email
Jul 12, 2007
9:46 pm

... Serialized formats that are tied to one language are a liability, not a feature. ... Serialized formats that restrict what you can say are a liability. XML...
Elliotte Harold
elharo@...
Send Email
Jul 13, 2007
12:50 am

Perhaps next we could take up Ford vs. Chevy? Coke vs. Pepsi? PC vs. Mac?...
Karen
karencravens
Offline Send Email
Jul 13, 2007
1:28 am

... I agree very much. Languages are usually defined as a syntax with a semantics. What is needed is to disassociate the syntax from the semantics. If we keep...
Henry Story
hjsatdoc
Offline Send Email
Jul 13, 2007
10:42 am

... I agree. Good thing that JSON is not. ... When you want to deserialise a data structure, a serialisation format that restricts the data to the deserialised...
A. Pagaltzis
a22pag
Offline Send Email
Jul 16, 2007
2:56 am

I've started and trashed replies to this whole thread almost a dozen times... ... Elliotte, are you serious that this is a bad thing? You are arguing that...
John D. Heintz
johndheintz
Offline Send Email
Jul 13, 2007
2:46 am

... Very serious. ... Yes, it's ironic, but not wrong. You're quite perceptive to notice the connection, and bring this discussion back on topic. Schema...
Elliotte Harold
elharo@...
Send Email
Jul 13, 2007
10:10 am

... Now I'm totally lost. I thought REST was an architectural style. Maybe I don't know what you mean by "schema" or "language". -- Paul Winkler ...
Paul Winkler
slinkp23
Offline Send Email
Jul 13, 2007
3:23 pm

... My bad. Somehow I was thinking: "RELAX" and typing REST. I have to go back and reread the original post and see what it said about this. -- Elliotte Rusty...
Elliotte Harold
elharo@...
Send Email
Jul 16, 2007
2:24 am

I hate to add to this thread, which is probably off-topic for REST-discuss anyhow, but I just ran into a practical example of some of the tradeoffs between XML...
Bob Haugen
bob.haugen@...
Send Email
Jul 12, 2007
11:37 am

... Turns out, there is: it's called JavaScript. Sure, it's more verbose than XPath (but some would argue that's good). Since JSON translates fairly well...
Patrick Mueller
pmuellr
Offline Send Email
Jul 12, 2007
10:24 pm

... Is this uniquely true of JSON? It seems like it's true of XML as well ... if "xAL" creates different forms for different addresses, they're fundamentally ...
Josh Sled
joshsled
Offline Send Email
Jul 14, 2007
6:00 pm

... I don't know what I was thinking of. You are correct, of course. I am embarrassed....
Bob Haugen
bob.haugen@...
Send Email
Jul 14, 2007
6:43 pm

Ok. So this discussion is revealing a lot of confusion between syntax and semantics! Please take a good look at the graph here, to get a simple picture of ...
Henry Story
hjsatdoc
Offline Send Email
Jul 12, 2007
4:34 pm

... JSON is much simpler than the XML Infoset. Are you willing to argue about that? The XML API in use is a red herring. Yes, if you try to do XMLish things...
A. Pagaltzis
a22pag
Offline Send Email
Jul 12, 2007
1:32 am

... Not quite. JSON is the subset of JavaScript that is the simple notation for representing structured data. That contains strings, numbers, booleans, and ...
Josh Sled
joshsled
Offline Send Email
Jun 11, 2007
4:25 am
 First  |  |  Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help