Navigation: Developing Apps > BINETIX® AGE™ API > The Node > Toolkits > age_msgpack
encode/1
Description
encode/1 is an Erlang function exported by "age_msgpack" module.
Encodes Erlang terms into binary block in MessagePack format.
References
•decode/1
Parameters
Name
Type
Terms
any()
Any term to be serialized into MessagePack format.
Result
Value or Type
binary()
Returns serialized binary block.
Code Sample
> age_msgpack:encode(["String value...", #{f1 => 12.5, f2 => "Test"}, 10]). <<147,175,83,116,114,105,110,103,32,118,97,108,117,101,46,46,46,130,162,102,49,203,64,41,0,0,0,0,0,0,162,102,50,164,84,101,115,116,10>>