View Source Hologram.Commons.SerializationUtils (hologram v0.2.0)

Summary

Functions

Deserializes binary data to Elixir term.

Serializes Elixir term to binary data.

Functions

deserialize(binary, allow_non_existing_atoms? \\ false)

@spec deserialize(binary(), boolean()) :: term()

Deserializes binary data to Elixir term.

Examples

iex> deserialize(<<131, 104, 3, 97, 1, 97, 2, 97, 3>>)
{1, 2, 3}

serialize(term)

@spec serialize(term()) :: binary()

Serializes Elixir term to binary data.

Examples

iex> serialize({1, 2, 3})
<<131, 104, 3, 97, 1, 97, 2, 97, 3>>