Navigation: Developing Apps > BINETIX® AGE™ API > The Node > Toolkits > age_msgpack
encode_from_json/1
Description
encode_from_json/1 is an Erlang function exported by "age_msgpack" module.
Trans-code JSON string into binary block in MessagePack format.
References
•decode_to_json/1
Parameters
Name
Type
Input
string()
Input string in JSON format.
Result
Value or Type
bianry()
Returns serialized binary block.
Code Sample
> age_msgpack:encode_from_json("{\"f1\": 12.5, \"f2\": \"Test\"}"). <<130,162,102,49,203,64,41,0,0,0,0,0,0,162,102,50,164,84,101,115,116>>