import json
from pygments import highlight
from pygments.lexers import JsonLexer
from pygments.formatters import TerminalFormatter


def print_json_obj(json_object):
    json_str = json.dumps(json_object, indent=4, sort_keys=True)
    print(highlight(json_str, JsonLexer(), TerminalFormatter()))


def print_json_str(json_str):
    print(highlight(json_str, JsonLexer(), TerminalFormatter()))

[((8, 15, 8, 64), 'json.dumps', 'json.dumps', (), '', False, 'import json\n'), ((9, 30, 9, 41), 'pygments.lexers.JsonLexer', 'JsonLexer', ({}, {}), '()', False, 'from pygments.lexers import JsonLexer\n'), ((9, 43, 9, 62), 'pygments.formatters.TerminalFormatter', 'TerminalFormatter', ({}, {}), '()', False, 'from pygments.formatters import TerminalFormatter\n'), ((13, 30, 13, 41), 'pygments.lexers.JsonLexer', 'JsonLexer', ({}, {}), '()', False, 'from pygments.lexers import JsonLexer\n'), ((13, 43, 13, 62), 'pygments.formatters.TerminalFormatter', 'TerminalFormatter', ({}, {}), '()', False, 'from pygments.formatters import TerminalFormatter\n')]