在Python中如何轉換JSON to Python dictionary
import json

# some JSON:
x =  '{ "name":"John", "age":30, "city":"New York"}'

# parse x:
y = json.loads(x)

# the result is a Python dictionary:
print(y["age"])
Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: 在Python中如何轉換JSON to Python dictionary ### Response: import json

# some JSON:
x =  '{ "name":"John", "age":30, "city":"New York"}'

# parse x:
y = json.loads(x)

# the result is a Python dictionary:
print(y["age"]) 