Re: [Json] Encoding detection (Was: Re: JSON: remove gap between Ecma-404 and IETF draft)

"Pete Cordell" <petejson@codalogic.com> Fri, 22 November 2013 11:32 UTC

Return-Path: <petejson@codalogic.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 095931AD8F7 for <json@ietfa.amsl.com>; Fri, 22 Nov 2013 03:32:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 2.736
X-Spam-Level: **
X-Spam-Status: No, score=2.736 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, FH_HOST_EQ_D_D_D_D=0.765, HELO_MISMATCH_COM=0.553, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, STOX_REPLY_TYPE=0.439] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TwcXaQFTgsUv for <json@ietfa.amsl.com>; Fri, 22 Nov 2013 03:32:45 -0800 (PST)
Received: from ppsa-online.com (lvps217-199-162-192.vps.webfusion.co.uk [217.199.162.192]) by ietfa.amsl.com (Postfix) with ESMTP id BEB151AD7C1 for <json@ietf.org>; Fri, 22 Nov 2013 03:32:44 -0800 (PST)
Received: (qmail 19681 invoked from network); 22 Nov 2013 11:32:16 +0000
Received: from host86-167-12-24.range86-167.btcentralplus.com (HELO codalogic) (86.167.12.24) by lvps217-199-162-217.vps.webfusion.co.uk with ESMTPSA (RC4-MD5 encrypted, authenticated); 22 Nov 2013 11:32:15 +0000
Message-ID: <54E53D571E5E4589B2E9FA17DC816002@codalogic>
From: Pete Cordell <petejson@codalogic.com>
To: Henri Sivonen <hsivonen@hsivonen.fi>, John Cowan <cowan@mercury.ccil.org>
References: <8413609C8A86497F856897AF2AA24960@codalogic><CEAA3067.2D132%jhildebr@cisco.com><CANXqsRJEtBoprQFrftz80ZigmBR_NHoEXK1sR4GyBtz5B2KC8Q@mail.gmail.com><20131120223305.GB5476@mercury.ccil.org><CANXqsRJmNmSRXssBnw3tGUt0veViENLoS=dp+gEr2RqvNAf4JQ@mail.gmail.com><20131121165615.GA12138@mercury.ccil.org> <CANXqsRKrcR54TzSFng0ysyTV60-uZZ7QQ-G4xJOB0gO29C7-Ag@mail.gmail.com>
X-Unsent: 1
Date: Fri, 22 Nov 2013 11:33:14 -0000
x-vipre-scanned: 0046AE8B005C3A0046AFD8
MIME-Version: 1.0
Content-Type: text/plain; format="flowed"; charset="UTF-8"; reply-type="original"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
Cc: es-discuss <es-discuss@mozilla.org>, JSON WG <json@ietf.org>, www-tag@w3.org, "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>, Paul Hoffman <paul.hoffman@vpnc.org>
Subject: Re: [Json] Encoding detection (Was: Re: JSON: remove gap between Ecma-404 and IETF draft)
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
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: Fri, 22 Nov 2013 11:32:47 -0000

----- Original Message From: "Henri Sivonen"
>On Thu, Nov 21, 2013 at 3:39 PM, Anne van Kesteren <annevk@annevk.nl> 
>wrote:
>> XHR's responseType = "json" only supports UTF-8 (optionally with a
>> leading BOM), across the board.
>
> Good point. I wrote the code that enforces that constraint, but I forgot.
>
> Well, there's an interoperability reason against UTF-16, too, then.

Personally I think we have to be careful not to fall into the trap of 
assuming that the only use-case for JSON will be in "to browser" 
communications.  I'm hoping that for the IETFs purposes we'll be looking at 
JSONs wider utility into broader areas, which may even include logging to 
files and interprocess communication where there might be sensible reasons 
to choose something other than UTF-8.

Pete Cordell
Codalogic Ltd
C++ tools for C++ programmers, http://codalogic.com
Read & write XML in C++, http://www.xml2cpp.com