Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 17784 invoked from network); 9 Mar 2009 19:22:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Mar 2009 19:22:11 -0000 Received: (qmail 15793 invoked by uid 500); 9 Mar 2009 19:22:07 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 15764 invoked by uid 500); 9 Mar 2009 19:22:07 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 15751 invoked by uid 99); 9 Mar 2009 19:22:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2009 12:22:07 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [80.68.94.123] (HELO tumbolia.org) (80.68.94.123) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2009 19:21:58 +0000 Received: from nslater by tumbolia.org with local (Exim 4.69) (envelope-from ) id 1Lgl2f-00077J-Om for user@couchdb.apache.org; Mon, 09 Mar 2009 19:21:37 +0000 Date: Mon, 9 Mar 2009 19:21:37 +0000 From: Noah Slater To: user@couchdb.apache.org Subject: Re: Canonical JSON [Proposal for digital signatures of documents] Message-ID: <20090309192137.GC22353@tumbolia.org> Mail-Followup-To: user@couchdb.apache.org References: <283A6EDD-6701-4A6A-88AE-8B97E6D11D9E@mooseyard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Noah: Awesome User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Mar 09, 2009 at 11:52:46AM -0700, Chris Anderson wrote: > I guess I was trying to punt on a canonical format, because of things > like this. In my estimation, the format could be less-than-canonical > and still capable of being reliably signed, if the signature is > willing to put bounds on the precision needed to remain valid. There > will be edge cases, but maybe we can discourage them by disallowing E > notation, so that all numbers would have to be in plain old > int.something format and if the signature wants to treat > 0.13421143112e-12 as "0.00" that's it's business. Not perfect, but > better than disallowing floats? My company produce price feeds using decimals, and we need those decimals to be decimals. For that reason, and after much messing about and research, I decided that we should use strings for all non-int numerical values. I would be supportive of a canonicalisation format that followed this rationale. -- Noah Slater, http://tumbolia.org/nslater