Navigation: Developing Apps > BINETIX® AGE™ API > The Node > Toolkits > age_json
items_to_string/1
Description
items_to_string/1 is an Erlang function exported by "" module.
Encodes list of tuples in format {atom(), any()} into JSON object.
References
•encode/1
•string_to_items/1
Parameters
Name
Type
Input
list(tuple())
Input list with tuples {Name, Value}, where name must be an Erlang's atom.
Result
Value or Type
string()
Returns string in JSON format.
Code Sample
> age_json:items_to_string([{a, 1}, {b, "Test"}]). "{\"a\":1,\"b\":\"Test\"}"