import json x = '{ "name":"John", "age":30, "city":"New York"}' y = json.loads(x) print(y["age"])
import json # some JSON: x = '{ "name":"John", "age":30, "city":"New York"}' # parse x: y = json.loads(x)
import json x = { "name": "John", "age": 30, "city": "New York" } y = json.dumps(x)