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):
- In JSON, keys must always use double quotes (
"..."). Single quotes are invalid. - Boolean values in JSON are lowercase (
true,false). In Python, they are capitalized (True,False). - JSON uses
nullto represent nothing, which maps toNonein Python.