couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lynton Grice" <lynton.gr...@logosworld.com>
Subject JSON encoding errors
Date Sat, 25 Jul 2009 14:16:25 GMT
Hi there,

I have installed the latest version of CouchDB on windows and it is working
great. I can run the test suite and all seems fine. I have used the Mochiweb
bundled with the CouchDB download.

I have also downloaded the "Erlang_Couch" library but when I try create a
document:

erlang_couchdb:create_document({"localhost", 5984}, "karoona", [{<<"name">>,
<<"Korale">>}, {<<"type">>, <<"character">>}]).

I get this error back:
                  {json_encode,
                       {bad_term,
                           {struct,
                               [{<<"name">>,<<"Korale">>},
                                {<<"type">>,<<"character">>}]}}}
     in function  mochijson2:json_encode/2
     in call from erlang_couchdb:create_document/3

It seems the problem lies entirely with the "mochijson2.erl" file. The file
I am using from the CouchDB download seems to let CouchDB run fine BUT when
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?

Many thanks

Lynton




Mime
View raw message