@staticmethod<EOL><INDENT>def format_json(event, colored):<DEDENT>
try:<EOL><INDENT>if event.message.startswith("<STR_LIT:{>"):<EOL><INDENT>msg_dict = json.loads(event.message)<EOL>event.message = json.dumps(msg_dict, indent=<NUM_LIT:2>)<EOL><DEDENT><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT>return event<EOL>
If the event message is a JSON string, then pretty print the JSON with 2 indents and sort the keys. This makes
it very easy to visually parse and search JSON data