msgpax v0.8.2 Msgpax.Packer protocol

The Msgpax.Packer protocol is responsible for serializing any Elixir data structure according to the MessagePack specification.

Some notable properties of the implementation of this protocol for the built-in Elixir data structures:

  • atoms are encoded as strings (i.e., they’re converted to strings first and then encoded as strings)
  • bitstrings can only be encoded as long as they’re binaries (and not actual bitstrings - i.e., the number of bits must be a multiple of 8)
  • binaries (or Msgpax.Bin structs) containing 2^32 or more bytes cannot be encoded
  • maps with more than (2^32) - 1 elements cannot be encoded
  • lists with more than (2^32) - 1 elements cannot be encoded
  • integers bigger than (2^64) - 1 or smaller than -2^63 cannot be encoded

Summary

Functions

This function serializes term

Types

t :: term

Functions

transform(term)

This function serializes term.

It returns an iodata result.