couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirkjan Ochtman <dirk...@ochtman.nl>
Subject Re: [VOTE] Apache CouchDB 1.2.0 release, first round
Date Sun, 12 Feb 2012 18:45:24 GMT
On Sun, Feb 12, 2012 at 17:48, Noah Slater <nslater@tumbolia.org> wrote:
> Try alert(2.2000000000000002 == 2.2) in ANY browser. It will say true.
>> JavaScript uses IEEE double for  Number, always has, always will.
>
> The general consensus seems to be that if you don't want JSON messing
> around with your numbers, then you encode them as strings. Otherwise,
> unless you're using integers, expect weirdness.

The problem with that is that JSON != JavaScript. If CouchDB is a JSON
store, it should properly round-trip my JSON. How JavaScript would
handle my JSON seems unrelated to how a theoretical JSON store would
handle it. I prefer that CouchDB acts as much like a theoretical JSON
store as possible.

Cheers,

Dirkajn

Mime
View raw message