argopy.ArgoReferenceValue.to_json

argopy.ArgoReferenceValue.to_json#

ArgoReferenceValue.to_json(path: str | PathLike[str] | None = None, keys: list[str] | None = None, **kwargs)[source]#

Export to a JSON string or path

Parameters:
  • path (str, path object, file-like object, or None, default None) – String, path object (implementing os.PathLike[str]), or file-like object implementing a write() function. If None, the result is returned as a string.

  • keys (list[str], optional, default = None) – List of attributes to output as keys in the JSON structure. All by default if set to None.

  • **kwargs – All other arguments are passed to json.dumps or json.dump

Returns:

If path is None, returns the resulting json format as a string. Otherwise, returns None.

Return type:

None or str