This library provides an API for serializing and de-serializing Elixir terms using the MessagePack format.
Documentation is available online.
- Packing and unpacking Elixir terms via
Msgpax.pack/1andMsgpax.unpack/1(and their!bang variants). - Unpacking of partial slices of MessagePack-encoded terms via
Msgpax.unpack_slice/1. - Support for "Binary" and "Extension" MessagePack types via
Msgpax.BinandMsgpax.Ext, respectively. - Protocol-based packing through the
Msgpax.Packerprotocol, that can be derived for user-defined structs. - A
Plug.Parsersplug (Msgpax.PlugParser) to parse requests with MessagePack-encoded bodies.
A detailed table that shows the relationship between Elixir types and MessagePack types can be found in the documentation for the Msgpax module.
Add :msgpax as a dependency in your mix.exs file:
def deps do
[{:msgpax, "~> 2.0"}]
endThen, run mix deps.get in your shell to fetch the new dependency.
Msgpax is released under the ISC license.