jschon.utils

jschon.utils.json_dumpf(obj, path)

Serialize a JSON-compatible Python object to a JSON file.

Parameters
  • obj (Any) –

  • path (Union[str, os.PathLike]) –

Return type

None

jschon.utils.json_dumps(obj)

Serialize a JSON-compatible Python object to a JSON string.

Parameters

obj (Any) –

Return type

str

jschon.utils.json_loadf(path)

Deserialize a JSON file, returning a JSON-compatible Python object.

Parameters

path (Union[str, os.PathLike]) –

Return type

Any

jschon.utils.json_loadr(url)

Fetch and deserialize a remote JSON resource, returning a JSON-compatible Python object.

Parameters

url (str) –

Return type

Any

jschon.utils.json_loads(value)

Deserialize a JSON string, returning a JSON-compatible Python object.

Parameters

value (str) –

Return type

Any

jschon.utils.tuplify(value)
Parameters

value (Any) –

Return type

Tuple