json

json_serialize(item: Any) str

Serializes an item into a json.

Parameters

item (Any) – The item that will be serialized

Returns

The serialized item

Return type

str

Raises

Exception – raised if the item is an integer value out of the Neo’s accepted range, is a dictionary with a bytearray key, or isn’t serializable.

json_deserialize(json: str) Any

Deserializes a json into some valid type.

Parameters

json (str) – A json that will be deserialized

Returns

The deserialized json

Return type

Any

Raises

Exception – raised if jsons deserialization is not valid.