Skip to content

Instantly share code, notes, and snippets.

@ifahadone
Last active November 18, 2021 06:58
Show Gist options
  • Save ifahadone/43f084068912acc8c42b6005b92d126a to your computer and use it in GitHub Desktop.
Save ifahadone/43f084068912acc8c42b6005b92d126a to your computer and use it in GitHub Desktop.
python implementation of JSON Structured data pretty print
import json
dict="{"employee":{"name":"fahad", "age":0, "city":"No"}}"
json_data = json.dumps(dict)
parsed = json.loads(json_data)
print(json.dumps(parsed, indent=4, sort_keys=True))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment