[ 
https://issues.apache.org/jira/browse/THRIFT-1321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Louis-Philippe Gauthier updated THRIFT-1321:
--------------------------------------------

    Attachment: bug.diff

> Map serialization is broken in the Erlang library
> -------------------------------------------------
>
>                 Key: THRIFT-1321
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1321
>             Project: Thrift
>          Issue Type: Bug
>          Components: Erlang - Library
>    Affects Versions: 0.7
>            Reporter: Louis-Philippe Gauthier
>         Attachments: bug.diff
>
>
> dict:fold/3 always return ValData as a list and therefore breaks the pattern 
> matching.
> {quote}
> Dict = dict:new(),
> Dict2 = dict:append("key1", "value1", Dict),
> Dict3 = dict:append("key2", [1,2,3], Dict2),
> Dict4 = dict:append("key3", <<"value3">>, Dict3),
> dict:fold(fun(Key, Value, AccIn) -> io:format("~p : ~p~n", [Key, Value]) end, 
> [], Dict4).
> "key1" : ["value1"]
> "key2" : [[1,2,3]]
> "key3" : [<<"value3">>]
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to