import json


def json_formatter(result, verbose=False, indent=4, offset=0):
    """Format result as json."""
    string = json.dumps(result, indent=indent)
    string = string.replace("\n", "\n" + "  "*offset)
    return string