couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject Re: Use of json2.js in HEAD
Date Tue, 09 Feb 2010 17:01:06 GMT
On Tue, Feb 9, 2010 at 3:10 AM, Brian Candler <> wrote:
> FWIW, I get the same with 0.10.1 so it doesn't appear to be a regression.
> Both current and 0.10.1 were built under Ubuntu Hardy with spidermonkey

On thing that could be impacting this: json2.js prefers to drop back
to a native JSON serializer if one is available. This means
differences in spidermonkey version could conceivably give different
date formats.

For what it's worth, this is what I'm seeing when serializing date
objects on my end:


The map fun I used to do this looks like:

function(doc) {
if (doc.created_at)
  emit(new Date(doc.created_at), null);

In this case doc.created_at looked just like the final string (but it
was serialized in FF, not the view server.)

I'm running a fairly old spidermonkey.

$ js --version
JavaScript-C 1.8.0 pre-release 1 2007-10-03

As far as getting the JSON object into the sandbox for show and list,
I've got nothing against that. Tickets / patches are welcome.


Chris Anderson

View raw message