parameters: (json_file)
return_statement: return data
docstring: Load json file.
docstring_summary: Load json file.
docstring_tokens: Load json file .
function: def load_json(json_file):
    """Load json file."""
    with open(json_file, 'r') as f:
      try:
        data = json.loads(f.read())
      except Exception as e:
        raise(
            'Fail to load the json file `{}`, please check the format. \nError: {}'
            .format(json_file, e))
    return data
function_tokens: def load_json ( json_file ) : with open ( json_file , 'r' ) as f : try : data = json . loads ( f . read ( ) ) except Exception as e : raise ( 'Fail to load the json file `{}`, please check the format. \nError: {}' . format ( json_file , e ) ) return data