Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to avoid json decode problem in python

incorrect_json = '{ name":"John "age":30 "car:"None" }'
try:
	a_json = json.loads(incorrect_json)
	print(a_json)
except json.decoder.JSONDecodeError:
	print("String could not be converted to JSON")
 
PREVIOUS NEXT
Tagged: #avoid #json #decode #problem #python
ADD COMMENT
Topic
Name
4+2 =