import json


def get_chars(data, n, quiet):
    """Print first n chars of file."""
    if not quiet:
        print('\n> Show first {:,d} chars of file'.format(n))
    else:
        print('')

    data_str = json.dumps(data, indent=2, sort_keys=True)
    print(data_str[:n])
    return True