Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

python to json

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

# convert into JSON:
y = json.dumps(x)
Source by pythonexamples.org #
 
PREVIOUS NEXT
Tagged: #python #json
ADD COMMENT
Topic
Name
1+1 =