def METHOD_NAME(parser, **kwargs):
    """
    Generate JSON file for the block header
    """
    header = parser.filename.split('.')[0]
    block = parser.modname.split('-')[-1]
    if kwargs['output']:
        json_file = os.path.join('.', block + '_' + header + '.json')
        with open(json_file, 'w') as _file:
            json.dump(parser.parsed_data, _file, indent=4)
    else:
        print(json.dumps(parser.parsed_data, indent=4))