Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python dictionary to json

import json

# json -> string
j1 = {"name": "steve", "age": 64}
s1 = json.dumps(j)

# string -> json
s2 = '{"name": "steve", "age": 64}'
j2 = json.loads(s)
 
PREVIOUS NEXT
Tagged: #python #dictionary #json
ADD COMMENT
Topic
Name
3+5 =