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.

FeatureJSONXML
VerbosityConciseVerbose
Data TypesNumber, Boolean, Null, String, Array, ObjectString only
Browser ParsingJSON.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