gfw.common.io.json_load#

json_load(path, lines=False, coder=<class 'dict'>)[source]#

Opens JSON file.

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

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

  • coder (Callable[[...], Any]) – Coder to use when reading JSON records.

Return type:

List[dict[str, Any]] | dict[str, Any]