Skip to main content

JSON Structure

JSON data is structured as key-value pairs, which looks very similar to a Python dictionary.

{
"name": "Sai Kumar",
"age": 22,
"skills": ["Python", "JavaScript"],
"is_student": false
}

Differences (Python Dictionary vs JSON):

  1. In JSON, keys must always use double quotes ("..."). Single quotes are invalid.
  2. Boolean values in JSON are lowercase (true, false). In Python, they are capitalized (True, False).
  3. JSON uses null to represent nothing, which maps to None in Python.