gfw.common.io.json_save#

json_save(path, data, indent=4, lines=False)[source]#

Writes JSON file.

Parameters:
  • path (Path) – The destination path.

  • data (list[dict[Any, Any]]) – List of records to write.

  • indent (int) – Amount of indentation.

  • lines (bool) – If True, writes in JSON Lines format.

Return type:

Path