Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2006
    Posts
    417
    Thanks
    168
    Thanked 1 Time in 1 Post

    Why so much JSON hype?

    John Resig posted his RSS to JSON converter here:

    http://ejohn.org/apps/rss2json/?url=....org/index.rdf

    My question is: why is everyone going crazy over JSON?

    RSS/XML is great -- why replace it with JSON? What has JSON got that XML hasn't?

    (ie. what are the advantages of JSON over XML for the web developer?)

  • #2
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,100
    Thanks
    2
    Thanked 23 Times in 23 Posts
    You might want to read about some of the pros and cons here. Interesting reading.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #3
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    JSON is more domain-specific than XML, and by virtue of that may be better suited for simple data transactions via XMLHttpRequest() than XML. Given that XMLHttpRequest is almost never used to specifically request an XML document (why would you grab an SVG document and import it that way when you could just as easily load it in an iframe?), it makes sense use a better-suited but more limited data-format.

    Also, for "AJAX"-related work, in my own library, I send JS objects out, so it makes sense for me to receive JS objects back, rather than an XML document. (Constructing an XML document to send out is more expensive/more difficult than constructing a JS object, explaining my choice.)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •