Re: How to return json with maps?

28 views
Skip to first unread message
Message has been deleted

hjhaz...@gmail.com

unread,
Jan 5, 2015, 5:32:49 AM1/5/15
to chica...@googlegroups.com

We faced the same issue we junked 
{json,Object} to

{output, jsx:encode(Object),
[{<<"Content-Type">>, <<"application/json">>}]}


The json parser of chicagoboss is a bit old
On Saturday, 13 December 2014 19:19:37 UTC+5:30, Caiyun Deng wrote:
Hi!
I use my erlydtl branch https://github.com/dcy/erlydtl, and it can use maps.
But i found that i can't return json with maps.
The controller code "{ok, [{account, Account}]}" works fine, the Account is maps.
And the controller code "{json, [{recommend_game, maps:to_list(RecommendGame)}]}" works fine, and "{json, [{recommend_game, RecommendGame}]}" does not work.
How can i return json with maps?

Reply all
Reply to author
Forward
Message has been deleted
0 new messages