[erlang-questions] fast JSON parser in C

Jonathan Gray jlist@REDACTED
Wed Jul 23 19:49:04 CEST 2008


That's the interesting thing.

I've successfully encoded and decoded >1.5MB binary chunks of erlang terms
when I manually create them using erl_interface.

However when I get a big chunk (around 80-120K) directly from Erlang as
binary (using term_to_binary in erlang), I'm unable to decode it using
erl_interface erl_decode, though it can be decoded fine from within Erlang.

I haven't received any responses as to a fix and was redirected towards
using ei instead of (seemingly deprecated but not documented as deprecated)
erl_interface.

I'm going to do some testing with ei and will let you know if the problem
goes away.

Also, I'll take a look at Yajl now.  Thanks.

JG

-----Original Message-----
From: jchris@REDACTED [mailto:jchris@REDACTED] On Behalf Of Chris Anderson
Sent: Wednesday, July 23, 2008 10:20 AM
To: Jonathan Gray
Cc: erlang-questions@REDACTED
Subject: Re: [erlang-questions] fast JSON parser in C

On Wed, Jul 23, 2008 at 11:31 AM, Jonathan Gray <jlist@REDACTED> wrote:
> Chris,
>
> Considering your primary goal is speed, you definitely don't want to use
my
> implementation.

Thanks then for the info. My plan was to use
http://www.lloydforge.org/projects/yajl/ as a fast JSON parser, and
somehow get the results to Erlang. It looks like it may be more
challenging than I'd thought.

Out of curiosity, at roughly what size of input do you start to see
the segfaults? I'll probably start with the ei interface if that is
safer, but it will be nice to know how hard I have to push it to know
that I've done the job safely.

-- 
Chris Anderson
http://jchris.mfdz.com




More information about the erlang-questions mailing list