def colorize_json(data): colorful_json = highlight(unicode(data, 'UTF-8'), lexers.JsonLexer(), formatters.TerminalFormatter()) return colorful_json