[erlang-questions] How to access a Map returned by jiffy:decode()

Kenneth Lakin kennethlakin@REDACTED
Sat Jul 25 18:58:03 CEST 2015


On 07/25/2015 05:22 AM, avinash D'silva wrote:
> I have the following code.
>  Tx=jiffy:decode(<<"{\"foo\": \"bar\",\"key\": \"val\"}">>).
> 
> where Tx is:
> {[{<<"foo">>,<<"bar">>},{<<"key">>,<<"val">>}]}

You want to pass the return_maps option:

Tx=jiffy:decode(<<"{\"foo\": \"bar\",\"key\": \"val\"}">>, [return_maps]).

See: https://github.com/davisp/jiffy#jiffydecode12



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150725/53ba6d9b/attachment.bin>


More information about the erlang-questions mailing list