Re: [Json] LC comment on http://tools.ietf.org/html/draft-ietf-json-rfc4627bis-07#section-11

Bjoern Hoehrmann <derhoermi@gmx.net> Tue, 12 November 2013 12:23 UTC

Return-Path: <derhoermi@gmx.net>
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 030CE21E8117 for <json@ietfa.amsl.com>; Tue, 12 Nov 2013 04:23:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.985
X-Spam-Level:
X-Spam-Status: No, score=-2.985 tagged_above=-999 required=5 tests=[AWL=-0.386, BAYES_00=-2.599]
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 c+1Hx6igF9ll for <json@ietfa.amsl.com>; Tue, 12 Nov 2013 04:23:28 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by ietfa.amsl.com (Postfix) with ESMTP id 9E06221E8113 for <json@ietf.org>; Tue, 12 Nov 2013 04:23:22 -0800 (PST)
Received: from netb.Speedport_W_700V ([91.35.38.237]) by mail.gmx.com (mrgmx102) with ESMTPA (Nemesis) id 0MVsUW-1WDHfM46hM-00X7xq for <json@ietf.org>; Tue, 12 Nov 2013 13:23:21 +0100
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Julian Reschke <julian.reschke@gmx.de>
Date: Tue, 12 Nov 2013 13:23:21 +0100
Message-ID: <k374899m8hcrhpk2nu2srnh0b08ergvf33@hive.bjoern.hoehrmann.de>
References: <5281D65E.1080405@gmx.de>
In-Reply-To: <5281D65E.1080405@gmx.de>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:uRwTz43+XEdM4j8ewSEXe9E0UVlS0wYvK18BHiEQn1MU7DAtgWx ZDqHq+Qh6uf8PczcKjIVcfTflQLBKzlJwuD26oH0yEBYDDCrCh1bc097XgFJsxU7t0uTaP8 OuTXsNxS3cZTZ5OHaEcXquv8Z56hw3yHE+zXEIeCipTl02O9s0eFEyvNmSmVLabourUVa2A T1vxth+kqqPc4V8SbXsng==
Cc: "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] LC comment on http://tools.ietf.org/html/draft-ietf-json-rfc4627bis-07#section-11
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, 12 Nov 2013 12:23:33 -0000

* Julian Reschke wrote:
><http://tools.ietf.org/html/draft-ietf-json-rfc4627bis-07#section-11>:
>
>>    Encoding considerations:  8bit if UTF-8; binary if UTF-16 or UTF-32.
>>       JSON may be represented using UTF-8, UTF-16, or UTF-32.  When JSON
>>       is written in UTF-8, JSON is 8bit compatible.  When JSON is
>>       written in UTF-16 or UTF-32, the binary content-transfer-encoding
>>       must be used.
>
>That is a bit misleading, because content-transfer-encoding isn't needed 
>(nor defined) if the transport allows binary anyway (such as HTTP).

RFC 6838 calls for using one of "binary", "framed", "8bit" and "7bit"
for this field, and using anything other than "binary" or "framed" is
almost always wrong ("7bit" and "8bit" require CRLF line endings). It
is not framed, so

  Encoding considerations: binary

is all that is called for here.

>Related to this: a frequent question on stackoverflow is about the 
>charset parameter on application/json. Maybe it's worth re-stating that 
>it is not only not defined but also really really has no effect.

I agree that this is a common point of confusion, including in running
code, that should be explicitly addressed in the specification.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/