Erlang serialization library-Collection of common programming errors
As @Alexey Romanov said, try term_to_binary
and binary_to_term
. If you are talking between Erlang nodes, you don’t even need this, because the Erlang runtime can do this for you transparently.
There are also libraries for (un)serializing these values in other languages. The keyword for this is BERT (binary erlang terms). The homepage contains some links to libraries: http://bert-rpc.org/