Jido.Signal.Serialization.MsgpackSerializer (Jido Signal v1.0.0)
View SourceA serializer that uses the MessagePack format via the Msgpax library.
MessagePack is a binary serialization format that is more compact than JSON but still platform-independent, making it ideal for network communication and storage.
Features
- More compact than JSON
- Preserves more data types than JSON
- Cross-platform compatibility
- Fast serialization/deserialization
Usage
# Configure as default serializer
config :jido, :default_serializer, Jido.Signal.Serialization.MsgpackSerializer
# Or use explicitly
Signal.serialize(signal, serializer: Jido.Signal.Serialization.MsgpackSerializer)
Type Handling
MessagePack has limitations compared to Erlang terms:
- Atoms are converted to strings
- Tuples are converted to arrays
- Custom structs need explicit handling
Summary
Functions
Deserialize given MessagePack binary data back to the original format.
Serialize given term to MessagePack binary format.
Checks if the given binary is valid MessagePack data.
Functions
Deserialize given MessagePack binary data back to the original format.
Serialize given term to MessagePack binary format.
Checks if the given binary is valid MessagePack data.