# spacepy.datamodel.readJSONheadedASCII

`spacepy.datamodel.``readJSONheadedASCII`(fname, mdata=None, comment='#', convert=False, restrict=None)

  read JSON-headed ASCII data files into a SpacePy datamodel

  Parameters: | fname : str or list Filename(s) to read data from
  Returns: | mdata: spacepy.datamodel.SpaceData SpaceData with the data and metadata from the file
  Other Parameters:
  | mdata : spacepy.datamodel.SpaceData (optional) supply metadata object, otherwise is read from fname (default None) comment: str (optional) comment string in file to be read; lines starting with comment are ignored (default ‘#’) convert: bool or dict-like (optional) If True, uses common names to try conversion from string. If a dict- like then uses the functions specified as the dict values to convert each element of ‘key’ to a non-string restrict: list of strings (optional) If present, restrict the variables stored to only those on this list