fomat json load python

Solutions on MaxInterview for fomat json load python by the best coders in the world

showing results for - "fomat json load python"
Victoria
14 Jul 2017
1import json
2
3your_json = '["foo", {"bar":["baz", null, 1.0, 2]}]'
4parsed = json.loads(your_json)
5print(json.dumps(parsed, indent=4, sort_keys=True))
6
7#output:
8'''
9[
10    "foo", 
11    {
12        "bar": [
13            "baz", 
14            null, 
15            1.0, 
16            2
17        ]
18    }
19]
20'''