Re: [Json] Complete section 3 proposal

Nico Williams <nico@cryptonector.com> Tue, 18 June 2013 20:52 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F34EE21F9ABA for <json@ietfa.amsl.com>; Tue, 18 Jun 2013 13:52:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.966
X-Spam-Level:
X-Spam-Status: No, score=-1.966 tagged_above=-999 required=5 tests=[AWL=0.011, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 71jwwux+1w1X for <json@ietfa.amsl.com>; Tue, 18 Jun 2013 13:52:30 -0700 (PDT)
Received: from homiemail-a77.g.dreamhost.com (caiajhbdcahe.dreamhost.com [208.97.132.74]) by ietfa.amsl.com (Postfix) with ESMTP id 3E8DE21F962D for <json@ietf.org>; Tue, 18 Jun 2013 13:52:30 -0700 (PDT)
Received: from homiemail-a77.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a77.g.dreamhost.com (Postfix) with ESMTP id 00D3B94075 for <json@ietf.org>; Tue, 18 Jun 2013 13:52:30 -0700 (PDT)
Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a77.g.dreamhost.com (Postfix) with ESMTPSA id 9DA429406E for <json@ietf.org>; Tue, 18 Jun 2013 13:52:29 -0700 (PDT)
Received: by mail-wg0-f45.google.com with SMTP id j13so3921093wgh.12 for <json@ietf.org>; Tue, 18 Jun 2013 13:52:28 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yN5Xx5pGTWvLS/u3gRyGtxJF2p6phWVvgpMPFCsLQkk=; b=hReZAKEmYhhIoyMEBWPvw8f8PRWZ9lOq6GEL9nE17JD1s1jdtrZGvieGd1msTnoAhj BQ83+zBvgH5LjKDIxfKL7+qt3WEoOPkj0TeYlWhVWXcxnFOH7KnWOOLdrjAopMRZ4RBH JTjY3nB8Vl8gEyeuudm92yhHMyXLPeKHpUPV0Vb7h9q+KaR0QgpaE4hifRn3U44yrkbT i14pXu88zT007F6/NSJzFe7jNALdCduDOMhGGFx175almARMTzZzVqN7scAPrOE43b4P cHOe7ZE2dzzSJ1q/tbIW7Gfaa23SHsPvMx52xkqrt2ZUjuscOXscsoyacR+741nhq3zy ORVA==
MIME-Version: 1.0
X-Received: by 10.180.99.162 with SMTP id er2mr832430wib.36.1371588748407; Tue, 18 Jun 2013 13:52:28 -0700 (PDT)
Received: by 10.216.29.5 with HTTP; Tue, 18 Jun 2013 13:52:28 -0700 (PDT)
In-Reply-To: <A723FC6ECC552A4D8C8249D9E07425A70FC58C0B@xmb-rcd-x10.cisco.com>
References: <A723FC6ECC552A4D8C8249D9E07425A70FC58C0B@xmb-rcd-x10.cisco.com>
Date: Tue, 18 Jun 2013 15:52:28 -0500
Message-ID: <CAK3OfOgFqwxkoZtv2t9XR4t-DLYRoBJeATtGhOHZ2ZACACW4Gg@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>
Content-Type: text/plain; charset=UTF-8
Cc: "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Complete section 3 proposal
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Jun 2013 20:52:36 -0000

On Tue, Jun 18, 2013 at 3:40 PM, Joe Hildebrand (jhildebr)
<jhildebr@cisco.com> wrote:
> Combining the threads
>
> """
> Without an external mechanism that specifies encoding, when serialized to
> an octet stream, JSON text SHALL be encoded in one of the following
> Unicode encoding schemes: UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, or
> UTF-32LE.  The default and RECOMMENDED encoding is UTF-8.

Note that if a JSON string in JSON data contains unescaped naked
surrogates then the encoding of that data will not be valid UTF-8,
UTF-16, nor, for that matter, CESU-8.  And some implementations
probably produce CESU-8-encoded data.  I'm not sure whether that's
worth stating here or elsewhere, but the fact that there's
not-quite-UTF-8 JSON out there means this SHALL is either
interop-breaking or the matter must be mentioned nearby.

With this caveat, +1.

>     Note: the MIME type registered in [Section 6] does not specify such an
> external mechanism, so when used in a MIME context, one of the above
> encoding schemes MUST be used.

Agreed.

Nico
--