couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lynton Grice" <>
Subject RE: JSON encoding errors
Date Sat, 25 Jul 2009 15:39:12 GMT
Hi there,

I just tried that and it still gives an error. Any other idea?

erlang_couchdb:create_document({"localhost", 5984}, "iplaywow", {struct,
[{<<"name">>, <<"Korale">>}, {<<"type">>, <<"character">>}]}).
** exception exit: {json_encode,
     in function  mochijson2:json_encode/2
     in call from erlang_couchdb:create_document/3

-----Original Message-----
From: Benoit Chesneau [] 
Sent: 25 July 2009 05:26 PM
Subject: Re: JSON encoding errors

2009/7/25 Lynton Grice <>:

> It seems the problem lies entirely with the "mochijson2.erl" file. The
> I am using from the CouchDB download seems to let CouchDB run fine BUT
> I try use the "mochijson2" file from standard Erlang I get errors pretty
> much all the time.
> Any idea how I can solve these JSON errors?
I'm using mochijson2 for a library I expect to  release this we, and I
have no problem with it. It seem that you miss the struc term in your
doc :

<<"Korale">>}, {<<"type">>, <<"character">>}]

should be

{struct, [{<<"name">>,
<<"Korale">>}, {<<"type">>, <<"character">>}]}

- benoƮt

View raw message