Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

readme.md

JSONDecodeError: Expecting property name enclosed in double quotes

Occurs when JSON format is invalid.

Reproduce

import json

data = '{"name": "john", age: 30}'

parsed = json.loads(data)
print(parsed)

Error Message

json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 18 (char 17)

Fix

import json

data = '{"name": "john", "age": 30}'

parsed = json.loads(data)
print(parsed)

Reflection

Used invalid JSON format without quoting a property name. The error message specifically pointed to the location where the quote was missing.