Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 3605 invoked from network); 9 Mar 2009 17:23:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Mar 2009 17:23:14 -0000 Received: (qmail 39003 invoked by uid 500); 9 Mar 2009 17:23:13 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 38416 invoked by uid 500); 9 Mar 2009 17:23:11 -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 38405 invoked by uid 99); 9 Mar 2009 17:23:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2009 10:23:11 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jens@mooseyard.com designates 208.97.132.66 as permitted sender) Received: from [208.97.132.66] (HELO randymail-a9.g.dreamhost.com) (208.97.132.66) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2009 17:23:02 +0000 Received: from snej-mbp.mtv.corp.google.com (216-239-45-4.google.com [216.239.45.4]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by randymail-a9.g.dreamhost.com (Postfix) with ESMTP id 8F9BFDE41B for ; Mon, 9 Mar 2009 10:22:41 -0700 (PDT) Message-Id: From: Jens Alfke To: user@couchdb.apache.org In-Reply-To: Content-Type: multipart/alternative; boundary=Apple-Mail-72-614123416 Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Canonical JSON [Proposal for digital signatures of documents] Date: Mon, 9 Mar 2009 10:22:41 -0700 References: <283A6EDD-6701-4A6A-88AE-8B97E6D11D9E@mooseyard.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-72-614123416 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable On Mar 8, 2009, at 4:51 PM, Antony Blakey wrote: > OLPC has a start on canonical JSON: = http://wiki.laptop.org/go/Canonical_JSON=20 > . Thanks for the link! I'd done a bit of searching for prior-art, but =20 hadn't run across that. It's pretty close to my description. It looks good, except that =95 They say that arbitrary byte sequences are allowed in strings. This =20= is really problematic (it makes it impossible to reliably convert JSON =20= to an in-memory JavaScript string object!) and contradicts the JSON =20 spec, whose third paragraph says that "a string is a sequence of zero =20= or more Unicode characters". =95 As I did, they say keys should be sorted in "lexicographic order". =20= Like me, they probably meant "code-point order". The ban on floating-point numbers is sensible. I'd draw the line at =20 banning integers, though, as that tends to really complicate round-=20 trip transformations with in-memory objects. (Every int field has to =20 be shadowed as a string.) I've updated the wiki page accordingly. =97Jens= --Apple-Mail-72-614123416--