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'''