couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <>
Subject Re: [VOTE] Apache CouchDB 1.2.0 release, first round
Date Sun, 12 Feb 2012 10:15:48 GMT
On Sun, Feb 12, 2012 at 10:46 AM, Dirkjan Ochtman <> wrote:
> On Sun, Feb 12, 2012 at 02:15, Jason Smith <> wrote:
>> Does CouchDB store my **JSON** (and mutate it minimally, for _rev)?
>> Or does CouchDB store my **data**, where JSON is simply how we express
>> the underlying "stuff" to be stored?
> Yeah, I thought a little further about it during my night's sleep as
> well. I checked the JSON RFC, and it expresses no Number model; just
> the representation. The Number model under which 1.0 === 1 is
> JavaScript's, not JSON's. Therefore, it is impossible to conclude
> equivalence for any two Numbers in JSON notation, and CouchDB should
> roundtrip numbers as close to the original representation as possible.
> Cheers,
> Dirkjan

well as a database, CouchDB shouldn't change the way data are saved
in. I expect that the number I saved under the json type Number [1]
defined by the spec [2] is correctly saved and returned as is. No
roundtrip or precision lost should happen.

- benoƮt

[1] Number type has exactly 18437736874454810627 (that is,
2^64-2^53+3) values, representing the double- precision 64-bit format
IEEE 754 values as specified in the IEEE Standard for Binary
Floating-Point Arithmetic, except that the 9007199254740990 (that is,
2^53-2) distinct


View raw message