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 E339495EB for ; Mon, 13 Feb 2012 10:56:06 +0000 (UTC) Received: (qmail 59346 invoked by uid 500); 13 Feb 2012 10:56:06 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 59295 invoked by uid 500); 13 Feb 2012 10:56:05 -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 59282 invoked by uid 99); 13 Feb 2012 10:56:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 10:56:04 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of randall.leeds@gmail.com designates 209.85.210.52 as permitted sender) Received: from [209.85.210.52] (HELO mail-pz0-f52.google.com) (209.85.210.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 10:55:56 +0000 Received: by dado14 with SMTP id o14so6029503dad.11 for ; Mon, 13 Feb 2012 02:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=jvyAF/lOlnGFsvFz2c0+uH4Ihd8jEXIsmJ4UC61WQ3c=; b=RWZefiJrGRXittdgfjatFNgxGpsiCmsOANhdQXdYIGxDZiGRztZu9/gBoabgTaWc4d CKRrxuzmW0MVGlJ+nfI/nXjhSkMU4+hzPBhhFvT5xnymKhFZYqkvQfmNTMQeHzsyiv8l vSy/Qqf1Ul5U0a6+xX4hG2965hwQJH7WWSYw8= MIME-Version: 1.0 Received: by 10.68.231.10 with SMTP id tc10mr46738964pbc.91.1329130534644; Mon, 13 Feb 2012 02:55:34 -0800 (PST) Received: by 10.68.221.98 with HTTP; Mon, 13 Feb 2012 02:55:34 -0800 (PST) Received: by 10.68.221.98 with HTTP; Mon, 13 Feb 2012 02:55:34 -0800 (PST) In-Reply-To: References: Date: Mon, 13 Feb 2012 02:55:34 -0800 Message-ID: Subject: Re: [VOTE] Apache CouchDB 1.2.0 release, first round From: Randall Leeds To: dev@couchdb.apache.org Content-Type: multipart/alternative; boundary=047d7b33d19e60ad1a04b8d651b2 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b33d19e60ad1a04b8d651b2 Content-Type: text/plain; charset=UTF-8 On Feb 13, 2012 1:10 AM, @ gmail.com > wrote: > > So rule 1 has to be, whatever I put in, I get back. > > What happens at a view level is different. If I've stored 1.0 or 1 as a > numeric (ie non-string) value, then what happens in the javascript of a > view is more flexible. Here I'm living in the real world of nasty floats > etc and in this case my view code should take appropriate care of what the > number might actually be. I'd kind of expect anything with a decimal point > to be interpreted as a float and anything without one to be interpreted as > an integer. That seems pretty basic and easy to understand. Thanks, Roger. You seem to be touching on is the fact that CouchDB puts incoming JSON through a round trip always, and Paul that floats always incur lossy transformations. Since we can't fix encoding/decoding in general (though we can for integers), we'd like not to touch the JSON that hits disk so that it's always stored verbatim, but API responses need to insert metadata for many requests. I recall that Paul objected to the string manipulation that would be required to join the disk JSON with the meta properties. A very rigorous approach might be to work with the tokenized, but not decoded, JSON so that numeric field values could be passed verbatim. For 1.2 I'd just like to see the integer regression patched. --047d7b33d19e60ad1a04b8d651b2--