python jsonify print code example
Example 1: JSON.stringify pretty
var str = JSON.stringify(obj, null, 2); // spacing level = 2
Example 2: python json stringify
import json
json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])
'["foo", {"bar": ["baz", null, 1.0, 2]}]'
print(json.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True))
{"a": 0, "b": 0, "c": 0}