ApocalypeX Posted July 20, 2010 Share Posted July 20, 2010 Widely hailed as the successor to XML in the browser, JSON aspires to be nothing more than a simple, and elegant data format for the exchange of information between the browser and server; and in doing this simple task it will usher in the next version of the World Wide Web itself.Many people have never really heard of JSON and its starting to grow a sort of infamy as AJAX did. I've started to use it alot in some of my server related work instead of XML or raw text, its very useful.I'm not asking for a a whole tutorial equal to Javacript or PHP. Just a little one similar to that of the AJAX and E4X tuts. I think it would help alot of people grasp what it is and also educate those who know nothing of it. I've seen a few tuts on other sites but they are not as clear as they should be.What do you think? Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted July 21, 2010 Share Posted July 21, 2010 I agree, because it took me an hour a few days ago to figure out that single quotes were not allowed in JSON, so jQuery kept refusing to parse it! Link to comment Share on other sites More sharing options...
Synook Posted July 21, 2010 Share Posted July 21, 2010 JSON is not a programming language... it is not even a mechanism, like AJAX, it is just part of the JavaScript syntax. The official website, http://json.org/, covers the notation in full, and I don't think anything more is necessary. Perhaps the JavaScript tutorial should have a page describing the syntax, but I can't really see what would comprise a complete tutorial, or even a "mini-tut".P.S. in JavaScript, strings can be delimited with single or double quotes (unlike e.g. Java), and so JSON does accept single-quoted strings. Quick test, just evaluate ['a'], no error will be raised. Link to comment Share on other sites More sharing options...
jeffman Posted July 21, 2010 Share Posted July 21, 2010 Of course, since JSON is first constructed as a string, the whole thing must be wrapped in quotation marks. This can lead to the usual troubles. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.