obspy.core.json.core.writeJSON

writeJSON(obj, filename, omit_nulls=False, pretty_print=True, **kwargs)[source]

Write object to a file in JSON format

Parameters:
  • obj (event class object) The ObsPy Event-type object to write.
  • filename (str or file) Filename to write or open file-like object.
  • omit_nulls (bool) Don’t include empty-valued attributes
  • pretty_print (bool) Indent for readability