README 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. JSON in JavaScript
  2. Douglas Crockford
  3. douglas@crockford.com
  4. 2015-05-03
  5. JSON is a light-weight, language independent, data interchange format.
  6. See http://www.JSON.org/
  7. The files in this collection implement JSON encoders/decoders in JavaScript.
  8. JSON became a built-in feature of JavaScript when the ECMAScript Programming
  9. Language Standard - Fifth Edition was adopted by the ECMA General Assembly
  10. in December 2009. Most of the files in this collection are for applications
  11. that are expected to run in obsolete web browsers. For most purposes, json2.js
  12. is the best choice.
  13. json2.js: This file creates a JSON property in the global object, if there
  14. isn't already one, setting its value to an object containing a stringify
  15. method and a parse method. The parse method uses the eval method to do the
  16. parsing, guarding it with several regular expressions to defend against
  17. accidental code execution hazards. On current browsers, this file does nothing,
  18. preferring the built-in JSON object. There is no reason to use this file unless
  19. fate compels you to support IE8, which is something that no one should ever
  20. have to do again.
  21. json_parse.js: This file contains an alternative JSON parse function that
  22. uses recursive descent instead of eval.
  23. json_parse_state.js: This files contains an alternative JSON parse function that
  24. uses a state machine instead of eval.
  25. cycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle,
  26. which make it possible to encode cyclical structures and dags in JSON, and to
  27. then recover them. This is a capability that is not provided by ES5. JSONPath
  28. is used to represent the links. [http://GOESSNER.net/articles/JsonPath/]