couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject json2.js (was Re: Time processing difference between 0.11.0b898401 and 0.11.0b903617)
Date Thu, 28 Jan 2010 00:06:46 GMT
On Wed, Jan 27, 2010 at 3:52 PM, Chris Anderson <jchris@apache.org> wrote:
> On Wed, Jan 27, 2010 at 12:41 PM, David Coallier
> <david.coallier@gmail.com> wrote:
>>> Can you try with r902422?
>>>
>
> I just tested with my copy of trunk and this temp view:
>
> function(doc) {
>  var d = new Date("2010/02/04");
>  emit(d, null);
> }
>
> I only have one doc, in there, so my rows are
>
> "2010-02-04T08:00:00.000Z", null
>
> Which to me looks like what I was expecting.

I should ask, to make sure I'm not crazy:

Is anyone else having trouble with views that emit Date objects in the
key (running latest trunk)?

How do we feel about the new undefined handling? It should be worth it
in terms of compatibility with other engines.

Everything works for me, but I don't want to roll a release without
asking for feedback.

Thanks,
Chris

>
> That doesn't explain your {} though. Maybe it is the result of parsing
> an invalidate date format? you can use log() in your functions to
> output to the couch.log (at info level)
>
> Maybe you have an undefined that used to be silently ignored but now
> is trying to serialize and coming out with {}?
>
> Chris
>
>>> If this is a consequence of the json2.js change, we'll have to fix it.
>>
>>
>> I believe this is a consequence of json2.js as well (At least that's
>> the only difference that deals with time related matter that I could
>> identify).
>>
>> In fact how I fixed my code for now since this is a prod server is:
>> http://friendpaste.com/3VFWC3DftLPeplmusvdeUg
>>
>> I'll try with 902422 and let you know.
>>
>>
>>
>> --
>> Slan,
>> David
>>
>
>
>
> --
> Chris Anderson
> http://jchrisa.net
> http://couch.io
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Mime
View raw message