Introduction
JSON stands for JavaScript Object Notation.
Basics
- Use curly braces { } to define objects.
- Use name:value pairs inside an object to define properties.
- Use brackets [ ] to define arrays.
Methods
Language | Encode to JSON | Decode from JSON |
JavaScript | JSON.stringify() | JSON.parse() |
PHP | json_encode() | json_decode() |
XML or JSON?
Both are valid options, XML is the more mature technology but JSON is more concise. Currently JSON seems to be favored.
Bibliography / Further Reading
- Matt Doyle. JSON Basics: What You Need to Know. elated, March 2011.