couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject JSON (was Re: CouchDB / Mochiweb version)
Date Sat, 25 Jul 2009 19:42:02 GMT
On Sat, Jul 25, 2009 at 12:29 PM, Paul Davis<> wrote:
> On Sat, Jul 25, 2009 at 9:54 AM, Lynton
> Grice<> wrote:
>> Hi there,
>> Can someone let me know why CouchDB does not work with the latest version of
>> Mochiweb from the web? I get JSON encoding errors using the latest version
>> of Mochiweb. All the test suite tests fail with syntax errors. What version
>> of Mochiweb is bundled with the latest version of CouchDB?
>> There seems to be a difference in the "mochijson2.erl" file between the
>> mochiweb file bundled with the CouchDB download vs the latest Mochiweb "
>> mochijson2.erl".
>> Any ideas?
>> Lynton
> CouchDB's JSON serialization has always been slightly different than
> mochiweb's. At one point there was supposed to be a shift towards what
> CouchDB uses. There's a thread somewhere on erlang-questions IIRC that
> this move was discussed.
> HTH,
> Paul Davis

Moving this over to dev@ - although user@ is still on this reply.

Maybe we should just rename our patched version of the mochijson2
library to make the changes clear.

couch_json or couch_mochijson both come to mind.

Maybe changing names is silly - it depends on how many people are out
there having the same issue as Lynton. It would certainly make the
fact that it's patched more clear.

Also I'm starting to think we'll need someone to push the json bifs
stuff forward with the OTP team. It's not gonna just make itself
happen. They say there is going to be an easier practice for native
extensions, but perhaps it will take the imminent pressure of
encode_json and decode_json to light a fire under that effort.

Thoughts? This probably doesn't matter for 0.10


Chris Anderson

View raw message