0
1077
The following code will prettyprint a JSON string
import json
# Json string
json_string = '["foo", {"bar":["pk", null, 56.0, 9]}]'
parsed = json.loads(json_string)
print(json.dumps(parsed, indent=4, sort_keys=True))
[
"foo",
{
"bar": [
"pk",
null,
56.0,
9
]
}
]
Comment here