eta.util.file.write_json

write_json(fname, data, in_module=False, pretty=False)[source]

Write data to a JSON file.

Parameters:
  • fname (str) –

  • data (dict) –

  • in_module (bool, default=False) –

  • pretty (bool, default=False) – Whether to pretty-print the JSON by indenting new lines.