narupatools.state.serializable_object¶
Defines an object that can be serialized to and from protobuf.
Defines objects that can be easily serialized and deserialized to a form that is compatible with serialization formats such as JSON or protobuf.
Most serialization methods only work with primitive types (strings, floats and booleans), along with nest lists and string-valued dictionaries of these types. It is therefore a common problem of wanting to have a class be able to be serialized into these formats. This often means writing custom serialization and deserialization code for each class you define.
SerializableObject is a metaclass for any object which is saying to Narupa that it can be converted to and from a form that is serializable, and provides the load() and save() methods to do so.
Classes
|
Protocol for objects which can be converted to and from a serializable form. |