{
  "attachments": [],
  "comments_archived": true,
  "date": "2005-12-19T04:17:55.000Z",
  "layout": "post",
  "tags": [
    "asides",
    "ajax",
    "json",
    "webdev",
    "xml"
  ],
  "title": "Okay, okay, JSON is pretty hot",
  "wordpress_id": 802,
  "wordpress_slug": "okay-okay-json-is-pretty-hot",
  "wordpress_url": "http://decafbad.com/blog/?p=802",
  "year": "2005",
  "month": "12",
  "day": "18",
  "isDir": false,
  "slug": "okay-okay-json-is-pretty-hot",
  "type": "entry",
  "postName": "2005-12-18-okay-okay-json-is-pretty-hot",
  "html": "<p>The XML <strike>purist</strike> fanboy in me has had me <em>pshaw</em>'ing at JSON.  But, now that <a href=\"http://ws1.inf.scd.yahoo.com/common/json.html\">the recent JSON release from Yahoo!</a> reminded me of its existence and I <a href=\"http://decafbad.com/2005/12/FeedMagick/docs/json-demo.html\">gave it a shot</a> myself, I have to admit that it's pretty hot—if only for the cross-domain bridging capabilities and the no-fuss parsing.</p>\n<p>Although, I do worry about running into a poisoned payload someday that raids my cookie jar. </p>\n<!-- tags: webdev ajax json xml -->\n\n<div id=\"comments\" class=\"comments archived-comments\"><h3>Archived Comments</h3>\n<ul class=\"comments\">\n<li class=\"comment\" id=\"comment-221082692\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"http://beesbuzz.biz/\"><img src=\"http://disqus.com/api/users/avatars/plaidfluff.jpg\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"http://beesbuzz.biz/\">fluffy</a>\n</div>\n\n\n<p><a href=\"#comment-221082692\" class=\"permalink\"><time datetime=\"2005-12-19T06:50:57\">2005-12-19T06:50:57</time></a></p>\n</div>\n\n\n<div class=\"content\"><p>JSON is currently the big Hot Thing at work.  It's very good for some things, but IMO it's not nearly as robust as XML as far as generic interchange goes.  Its big drawback is that it's not nearly as flexible, and since elements are either unordered or stored in an array, you have to agree upon the actual structure of the document before you send it across the wire (which isn't so much the case with XML where often all you care about is the nesting order which you can handle with XPath or similar).</p>\n<p>It's GREAT for AJAX though, as long as you can trust the server of course.</p></div>\n\n\n</li>\n<li class=\"comment\" id=\"comment-221082695\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"http://www.whump.com/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=152a649080e99c313ecae9a34c60d11d&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"http://www.whump.com/\">Bill Humphries</a>\n</div>\n\n\n<p><a href=\"#comment-221082695\" class=\"permalink\"><time datetime=\"2005-12-19T07:26:09\">2005-12-19T07:26:09</time></a></p>\n</div>\n\n\n<div class=\"content\"><p>I thought <a href=\"http://microformats.org/wiki/rest/ahah\" rel=\"nofollow\">AHAH</a> was the current big thing. Just send HTML to the client and use <code>Element.innerHTML</code>.</p></div>\n\n\n</li>\n</ul>\n\n\n</div>\n\n\n",
  "body": "The XML <strike>purist</strike> fanboy in me has had me *pshaw*'ing at JSON.  But, now that [the recent JSON release from Yahoo!][yj] reminded me of its existence and I [gave it a shot][gs] myself, I have to admit that it's pretty hot—if only for the cross-domain bridging capabilities and the no-fuss parsing.\r\n\r\nAlthough, I do worry about running into a poisoned payload someday that raids my cookie jar. \r\n\r\n<!-- tags: webdev ajax json xml -->\r\n\r\n[yj]: http://ws1.inf.scd.yahoo.com/common/json.html\r\n[gs]: http://decafbad.com/2005/12/FeedMagick/docs/json-demo.html\r\n\r\n<div id=\"comments\" class=\"comments archived-comments\">\r\n            <h3>Archived Comments</h3>\r\n            \r\n        <ul class=\"comments\">\r\n            \r\n        <li class=\"comment\" id=\"comment-221082692\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"http://beesbuzz.biz/\"><img src=\"http://disqus.com/api/users/avatars/plaidfluff.jpg\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"http://beesbuzz.biz/\">fluffy</a>\r\n                </div>\r\n                <a href=\"#comment-221082692\" class=\"permalink\"><time datetime=\"2005-12-19T06:50:57\">2005-12-19T06:50:57</time></a>\r\n            </div>\r\n            <div class=\"content\"><p>JSON is currently the big Hot Thing at work.  It's very good for some things, but IMO it's not nearly as robust as XML as far as generic interchange goes.  Its big drawback is that it's not nearly as flexible, and since elements are either unordered or stored in an array, you have to agree upon the actual structure of the document before you send it across the wire (which isn't so much the case with XML where often all you care about is the nesting order which you can handle with XPath or similar).</p>\r\n\r\n<p>It's GREAT for AJAX though, as long as you can trust the server of course.</p></div>\r\n            \r\n        </li>\r\n    \r\n        <li class=\"comment\" id=\"comment-221082695\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"http://www.whump.com/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=152a649080e99c313ecae9a34c60d11d&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"http://www.whump.com/\">Bill Humphries</a>\r\n                </div>\r\n                <a href=\"#comment-221082695\" class=\"permalink\"><time datetime=\"2005-12-19T07:26:09\">2005-12-19T07:26:09</time></a>\r\n            </div>\r\n            <div class=\"content\"><p>I thought <a href=\"http://microformats.org/wiki/rest/ahah\" rel=\"nofollow\">AHAH</a> was the current big thing. Just send HTML to the client and use <code>Element.innerHTML</code>.</p></div>\r\n            \r\n        </li>\r\n    \r\n        </ul>\r\n    \r\n        </div>\r\n    ",
  "parentPath": "./content/posts/archives/2005",
  "path": "2005/12/18/okay-okay-json-is-pretty-hot",
  "needsBuild": true,
  "prevPostPath": "2005/12/18/js-versus-php",
  "prevPostTitle": "JS versus PHP?",
  "nextPostPath": "2005/12/19/feedburner-feeds-give-heartburn-to-php-xml-parsers",
  "nextPostTitle": "FeedBurner feeds give heartburn to PHP XML parsers?"
}