[erlang-questions] fast JSON parser in C

Richard A. O'Keefe ok@REDACTED
Fri Jul 25 05:55:27 CEST 2008

On 25 Jul 2008, at 10:56 am, Bob Ippolito wrote:
> I'd be curious to know if leex/yecc can do any better than mochijson2
> (which is written by hand), especially considering that it uses
> binaries instead of strings.
> http://code.google.com/p/mochiweb/source/browse/trunk/src/mochijson2.erl

I've printed that to study over the weekend.

Thing is, it doesn't have to be *better*.  It could even *be*
the mochijson2 code.  Part of what Joe was getting at, I think,
is that it would be nice if JSON support were a standard part
of Erlang/OTP in *some* fashion.  That way everyone who wants
to use JSON builds (for export) and sees (from import) the same
kind of Erlang data.

 From a quick glance at the that code, I believe that a BIF *could*
be usefully faster.  Whether it is worth putting the effort into it
is another matter.  There are also some interface issues; I would
value your comments on my EEP.

If stupidity were a crime, who'd 'scape hanging?

More information about the erlang-questions mailing list