[erlang-questions] Which Erlang JSON parser?
Filipe David Manana
Mon Aug 2 15:44:38 CEST 2010
You also have this event oriented (optionally) parser:
The Erlang structures it returns after parsing are 100% equivalent to
those of Mochiweb's JSON parser.
It's fully written in Erlang.
On Thu, Jul 29, 2010 at 10:01 AM, Alexander Kotelnikov
> It is a terrible story. I needed a JSON parcer to deal with JSON data in
> my Erlang programm.
> At first I picked json_eep
> (http://github.com/jchris/erlang-json-eep-parser.git) which worked quite
> fine, but later I found out that it is not able to parse (some!) escaped
> unicode characters:
> 28> json_eep:json_to_term("\"\\u0433\\u043e\\u0440\\u043e\\u0434\"").
> ** exception error: bad argument
> in function list_to_binary/1
> called as list_to_binary([1075,1086,1088,1086,1076])
> in call from json_grammar:yeccpars2_9/7
> in call from json_grammar:yeccpars0/2
> in call from json_eep:json_to_term/1
> My guess is that just a little change near list_to_binary should fix the
> Then I start investigation of other parsers. I found around 7. Most of
> them not eep0018 parsers. So I tried
> http://github.com/dizzyd/eep0018.git (both are based on yajl).
> The former did not build for me because of some rebar issues. The latter
> did after some changes to Makefiles. A little problem with it is that I
> do not understand, how it decodes unicode:
> 1> eep0018:json_to_term("\"\\u0433\\u043e\\u0440\\u043e\\u0434\"").
> Probably authors of these modules read this list and will clarify and/or
> fix if there is something to fix.
> Thanks, A.
> PS And, just in case if anyone cares, none of these parsers implements
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
Filipe David Manana,
"Reasonable men adapt themselves to the world.
Unreasonable men adapt the world to themselves.
That's why all progress depends on unreasonable men."
More information about the erlang-questions