Skip to content

Instantly share code, notes, and snippets.

@curiousily
Created May 2, 2020 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curiousily/45a6e8f38f2506cd0fda436cdc36ccd4 to your computer and use it in GitHub Desktop.
Save curiousily/45a6e8f38f2506cd0fda436cdc36ccd4 to your computer and use it in GitHub Desktop.
def print_json(json_object):
json_str = json.dumps(
json_object,
indent=2,
sort_keys=True,
default=str
)
print(highlight(json_str, JsonLexer(), TerminalFormatter()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment