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()))

[((181, 230), 'json.dumps', 'json.dumps', (['json_object'], {'indent': '(4)', 'sort_keys': '(True)'}), '(json_object, indent=4, sort_keys=True)\n', (191, 230), False, 'import json\n'), ((261, 272), 'pygments.lexers.JsonLexer', 'JsonLexer', ([], {}), '()\n', (270, 272), False, 'from pygments.lexers import JsonLexer\n'), ((274, 293), 'pygments.formatters.TerminalFormatter', 'TerminalFormatter', ([], {}), '()\n', (291, 293), False, 'from pygments.formatters import TerminalFormatter\n'), ((358, 369), 'pygments.lexers.JsonLexer', 'JsonLexer', ([], {}), '()\n', (367, 369), False, 'from pygments.lexers import JsonLexer\n'), ((371, 390), 'pygments.formatters.TerminalFormatter', 'TerminalFormatter', ([], {}), '()\n', (388, 390), False, 'from pygments.formatters import TerminalFormatter\n')]