Ar people = {"Programmers": [{"FirstName": "Brett", "LastName": "McLaughlin", "email": "AAAA"}, {"FirstName": "Jason", "LastName": "Hunter", "email": "BBBB"}, {"FirstName": "Elliotte", "LastName": "Harold", "email": "CCCC"}], "authors ": [{" FirstName ":" Isaac "," LastName ":" Asimov "," Genre ":" Science Fiction "}, {" FirstName ":" Tad "," LastName ":" William S "," genre ":" Fantasy "}, {" FirstName ":" Frank "," LastName ":" Peretti "," Genre ":" Christian Fiction "}], " musicians ": [{"FirstName": "Eric", "LastName": "Clapton", "instrument": "Guitar"}, {"FirstName": "Sergei", "LastName": "Rachmanino FF "," Instrument ":" Piano "}] }; Alert (json.stringify (people));
Above, only in IE8 or above, Firefox run
toJSONString (), must be introduced
Https://github.com/douglascrockford/JSON-js/blob/master/json.js
Limitations are larger than
JSON-to-string--jsonobj.tojsonstring () and json.stringify (Jsonobj)