Answers for "how to write an array to json in python"

3

python to json

# a Python object (dict):
x = {
  "name": "John",
  "age": 30,
  "city": "New York"
}

# convert into JSON:
y = json.dumps(x)
Posted by: Guest on May-02-2020

Code answers related to "how to write an array to json in python"

Python Answers by Framework

Browse Popular Code Answers by Language