import json


def format_json(json_object, indent, default):
    """ Pretty-format json data """
    indent_str = "\n" + " " * indent
    json_str = json.dumps(json_object, indent=2, default=default)
    return indent_str.join(json_str.split("\n"))