sciris.sc_fileio.jsonpickle

jsonpickle(obj, tostring=False)[source]

Save any Python object to a JSON file using jsonpickle.

Parameters
  • obj (any) – the object to pickle as a JSON

  • tostring (bool) – whether to return a string (rather than the JSONified Python object)

Returns

Either a string or a Python object for the JSON

Wrapper for the jsonpickle library: https://jsonpickle.github.io/