Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2046192BB for ; Sun, 12 Feb 2012 17:31:34 +0000 (UTC) Received: (qmail 6408 invoked by uid 500); 12 Feb 2012 17:31:33 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 6356 invoked by uid 500); 12 Feb 2012 17:31:32 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 6348 invoked by uid 99); 12 Feb 2012 17:31:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2012 17:31:32 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of robert.newson@gmail.com designates 209.85.210.180 as permitted sender) Received: from [209.85.210.180] (HELO mail-iy0-f180.google.com) (209.85.210.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2012 17:31:26 +0000 Received: by iabz7 with SMTP id z7so3989478iab.11 for ; Sun, 12 Feb 2012 09:31:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=references:from:in-reply-to:mime-version:date:message-id:subject:to :content-type:content-transfer-encoding; bh=ukDeyAsbW1Lmq/oC+rY0WG1vwim1rjVL2ui790Cn5sY=; b=Xivy5ejkS8bz3XdnEDlYSopE9FsH6gVMWCNPpgUTTYGsGuR89WGyANk0+bX9PxTJut zA8S01FtG5goghK4unHlVRuu+u+vXnOm8tvDJpbCctcQiBJxze1u2upjeaqYHlcxHKFD aHVkISiz8A5QwaBMwgHGQeWmb+cBwqhr/8Pf8= Received: by 10.42.46.76 with SMTP id j12mr18470959icf.22.1329067865521; Sun, 12 Feb 2012 09:31:05 -0800 (PST) References: From: Robert Newson In-Reply-To: Mime-Version: 1.0 (1.0) Date: Sun, 12 Feb 2012 17:30:57 +0000 Message-ID: <8171433147249007137@unknownmsgid> Subject: Re: [VOTE] Apache CouchDB 1.2.0 release, first round To: "dev@couchdb.apache.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I'm in favor of adding it to breaking changes and keeping the new behaviour. Both ejson and jiffy use %g to encode numbers. This favors a shorter encoding. On reflection, this is more desirable than pretending that json distinguishes between ints and floats. Sent from my iPhone On 12 Feb 2012, at 16:49, Noah Slater wrote: > I've been over this before: > > http://code.google.com/p/simplejson/issues/detail?id=3D34 > > > From Bob Ippolito: > > Try alert(2.2000000000000002 =3D=3D 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 wro= te: > >> On Sun, Feb 12, 2012 at 3:03 PM, Jason Smith wrote: >>> tl;dr =3D Minor disagreement with Benoit but happy to go with his decis= ion. >>> >>> On Sun, Feb 12, 2012 at 1:10 PM, Benoit Chesneau >> wrote: >>>> On Sun, Feb 12, 2012 at 12:03 PM, Jason Smith >> wrote: >>>>> On Sun, Feb 12, 2012 at 10:15 AM, Benoit Chesneau >> 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=EEt >> >> [1] http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=3D4610935 >>