Learn About JSON – The Universal Data Format
JSON (JavaScript Object Notation) is a language-independent, open-standard data format that represents structured data as human-readable text using attribute–value pairs and ordered lists.
- Text-based, lightweight, and easy to read.
- Built on two structures: objects (key–value pairs) and arrays (ordered values).
- Originally derived from JavaScript, but now supported natively or via libraries in JavaScript, PHP, Python, Ruby, Java, Go, C#, and more.
| Feature | JSON | XML |
|---|---|---|
| Verbosity | Concise | Verbose |
| Data Types | Number, Boolean, Null, String, Array, Object | String only |
| Browser Parsing | JSON.parse() | DOM / XPath |
{
"name": "Ada Lovelace",
"age": 36,
"skills": ["math", "programming"],
"active": true
}
- JavaScript:
JSON.parse(),JSON.stringify() - PHP:
json_decode(),json_encode() - Python:
json.loads(),json.dumps() - Ruby:
JSON.parse,JSON.generate - Java: Jackson, Gson, org.json
Trusted JSON Learning Resources
- json.org – Official specification and syntax diagrams.
- Wikipedia – JSON – Comprehensive history and technical details.
- w3schools.com – JSON Tutorial – Beginner-friendly examples and exercises.
- bob.ippoli.to – Remote JSON / JSONP – Classic article on cross-domain JSONP.
- Wikipedia – JSONP – Explanation of JSON with Padding for cross-origin requests.