README 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. JSON in JavaScript
  2. Douglas Crockford
  3. douglas@crockford.com
  4. 2010-11-18
  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. prefering the built-in JSON object.
  19. json.js: This file does everything that json2.js does. It also adds a
  20. toJSONString method and a parseJSON method to Object.prototype. Use of this
  21. file is not recommended.
  22. json_parse.js: This file contains an alternative JSON parse function that
  23. uses recursive descent instead of eval.
  24. json_parse_state.js: This files contains an alternative JSON parse function that
  25. uses a state machine instead of eval.
  26. cycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle,
  27. which make it possible to encode cyclical structures and dags in JSON, and to
  28. then recover them. JSONPath is used to represent the links.
  29. http://GOESSNER.net/articles/JsonPath/