couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noah Slater <nsla...@tumbolia.org>
Subject Re: [VOTE] Apache CouchDB 1.2.0 release, first round
Date Sun, 12 Feb 2012 16:48:41 GMT
I've been over this before:

http://code.google.com/p/simplejson/issues/detail?id=34


>From Bob Ippolito:

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.

However, I'm not sure I understand our choices here.

Could someone explain the choices we have, with a summary of what the net
result would be?

On Sun, Feb 12, 2012 at 2:58 PM, Benoit Chesneau <bchesneau@gmail.com>wrote:

> On Sun, Feb 12, 2012 at 3:03 PM, Jason Smith <jhs@iriscouch.com> wrote:
> > tl;dr = Minor disagreement with Benoit but happy to go with his decision.
> >
> > On Sun, Feb 12, 2012 at 1:10 PM, Benoit Chesneau <bchesneau@gmail.com>
> wrote:
> >> On Sun, Feb 12, 2012 at 12:03 PM, Jason Smith <jhs@iriscouch.com>
> wrote:
> >>> On Sun, Feb 12, 2012 at 10:15 AM, Benoit Chesneau <bchesneau@gmail.com>
> wrote:
> >>>> 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.
> >>>
> >>> Okay. "JSON type Number" is incoherent. JSON has only numerals, no
> >>> numbers. JavaScript standards are as relevant as FORTRAN standards.
> >>> But may we continue that discussion in JIRA?
> >>>
> >> I don't follow. JSON describes a number type, and refers to another
> >> iso standard too. How it's incoherent.
> >
> > I could be wrong but I don't see a reference to an ISO or similar
> > standard. I am reading RFC 4627.
> >
> The spec let me think that number should follow the ECMA-754 [1] . But
> i will double check.
>
> Anyway for me a document is a data I post on the disc and it seems
> reasonable to get the same result when I want to get it back.
>
> If it's not a regression, it isn't really a blocker I think. But I
> think we should definitely fix it.
>
> - benoƮt
>
> [1] http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=4610935
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message