Expand description
Serialization layer for the save system.
SerializedValue is a JSON-compatible value enum. The Serialize and
Deserialize traits let any game type opt into save/load support with a
few lines of code and no derive macros.
Save files are JSON, so they stay human-readable. The text itself is
written and parsed by serde_json, which handles the corners a small
hand-written parser gets wrong: non-ASCII text, surrogate pairs,
trailing garbage and deeply nested input.
Structs§
- Component
Serializer - Registry mapping component type names to their serialize/deserialize functions.
Enums§
- Deserialize
Error - Errors that can occur during deserialization.
- Serialized
Value - A generic serialized value, analogous to
serde_json::Value.
Traits§
- Deserialize
- Reconstruct a value from a
SerializedValue. - Serialize
- Convert a value to a
SerializedValue.