sbmlsim.serialization

Helpers for JSON serialization of experiments.

Module Contents

Classes

ObjectJSONEncoder

Class for encoding in JSON.

Functions

from_json(json_info)

Load data from JSON.

to_json(object, path = None)

Serialize to JSON.

sbmlsim.serialization.from_json(json_info)[source]

Load data from JSON.

Parameters

json_info (Union[str, pathlib.Path]) –

Return type

Dict[Any, Any]

sbmlsim.serialization.to_json(object, path=None)[source]

Serialize to JSON.

Parameters

path (pathlib.Path) –

Return type

Union[str, pathlib.Path]

class sbmlsim.serialization.ObjectJSONEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]

Bases: json.JSONEncoder

Class for encoding in JSON.

to_json(self, path=None)[source]

Convert definition to JSON for exchange.

Parameters

path (Optional[pathlib.Path]) – path for file, if None JSON str is returned

Returns

Return type

Union[str, pathlib.Path]

default(self, o)[source]

JSON encoder.