Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

fomat json load python

import json

your_json = '["foo", {"bar":["baz", null, 1.0, 2]}]'
parsed = json.loads(your_json)
print(json.dumps(parsed, indent=4, sort_keys=True))

#output:
'''
[
    "foo", 
    {
        "bar": [
            "baz", 
            null, 
            1.0, 
            2
        ]
    }
]
'''
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #fomat #json #load #python
ADD COMMENT
Topic
Name
3+3 =