Created
June 14, 2014 12:47
-
-
Save epappas/c0bd7e28631c2b4fb31d to your computer and use it in GitHub Desktop.
An example of use of jiffy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{[{<<"arr">>,[1,2,3,4]}, | |
{<<"arrStr">>,[<<"a">>,<<"b">>]}, | |
{<<"arrobj">>,[{[{<<"a">>,1},{<<"b">>,2}]}]}, | |
{<<"obj">>, | |
{[{<<"key1">>,<<"payload1">>},{<<"key2">>,<<"payload1">>}]}}, | |
{<<"testBool">>,true}, | |
{<<"testInt">>,1}, | |
{<<"testStr">>,<<"abc">>}, | |
{<<"testReal">>,1.2}]} = jiffy:decode(<<" | |
{ | |
\"arr\": [1,2,3,4], | |
\"arrStr\": [\"a\",\"b\"], | |
\"arrobj\": [{\"a\": 1,\"b\": 2}], | |
\"obj\": { | |
\"key1\": \"payload1\", | |
\"key2\": \"payload1\" | |
}, | |
\"testBool\": true, | |
\"testInt\": 1, | |
\"testStr\": \"abc\", | |
\"testReal\": 1.2 | |
} | |
">>). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment