What is the most mature JSON library for Erlang?

后端 未结 6 1107
日久生厌
日久生厌 2020-12-05 18:54

I wanted to use YAML but there is not a single mature YAML library for Erlang. I know there are a few JSON libraries, but was wondering which is the most mature?

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 19:25

    I prefer Jiffy. It works with binary and is realy fast.

    1> jiffy:decode(<<"{\"Name\":\"Tom\",\"Age\":10}">>).
    {[{<<"Name">>,<<"Tom">>},{<<"Age">>,10}]}
    

    Can encode as well:

    2> jiffy:encode({[{<<"Name">>,<<"Tom">>},{<<"Age">>,10}]}).
    <<"{\"Name\":\"Tom\",\"Age\":10}">>
    

提交回复
热议问题