ExMsgpax

ExMsgpax provides extensions for Msgpax to support tuple, naive datetime, etc.

Extention Types

ExMsgpax uses the Extention Types of MessagePack for data types which aare not supported by Msgpax.

TypeCodeRemarks
Atom0Atom types are converted to atom types, not strings.
NaiveDateTime1
Date2
Time3
Tuple4
Structs5
Exceptions6

Examples

iex> ExMsgpax.pack {1, 2, 3}
{:ok, <<214, 4, 147, 1, 2, 3>>}
iex> ExMsgpax.unpack <<214, 4, 147, 1, 2, 3>>
{:ok, {1, 2, 3}}

Installation

If available in Hex, the package can be installed by adding ex_msgpax to your list of dependencies in mix.exs:

def deps do
[
{:ex_msgpax, "~> 0.1.0"}
]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_msgpax.