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

Tim Bray <tbray@textuality.com> Fri, 22 November 2013 16:39 UTC

Return-Path: <tbray@textuality.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 D608B1ADBE5 for <json@ietfa.amsl.com>; Fri, 22 Nov 2013 08:39:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
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 BbOh-800qIAL for <json@ietfa.amsl.com>; Fri, 22 Nov 2013 08:39:57 -0800 (PST)
Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by ietfa.amsl.com (Postfix) with ESMTP id 1ED941ADFD3 for <json@ietf.org>; Fri, 22 Nov 2013 08:39:57 -0800 (PST)
Received: by mail-vb0-f54.google.com with SMTP id p6so1070268vbe.27 for <json@ietf.org>; Fri, 22 Nov 2013 08:39:49 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=lD3djPrjT2caQH01Hk0cAVcPkoQqT2VVyIfiwxtlVhs=; b=cD0ziIfXnv7nvBzppjErDZ04FNEmYXwkhNGvYbfDKb9hxMIg48cnURa01P+lt0oMDK QPKprqfGhpSGpmYvZOVRdzoTDr/k7Ffex4FABDXKLtzXzre6IAmzcIfYZDOjtzQ0OB8T 3NuOy1sKUVpy/JGFIE08XOipkzlxnvVXaWxH0BPhZlNReAr6leXA/q8peVRXBSjTPFuD WCpAclgfZ9olQ0mUUtjLdk8+027KIah9sE0pw9je4zsmsH5ExwqOm+q5YQ1UV60t4qzF UB+84oOZWY/BUKXn6TMNg9weTLtCX5CrzC+cBRzi3m1SIN+Lw72/jzOFtPaBEWPzAiL4 CI6Q==
X-Gm-Message-State: ALoCoQnJbJj0xHfdeUssbDgp2DhkSIe6bBmAWdFV5aivAYDKyH0ptlLVBJDDeZVym1cmoCR3fVAd
MIME-Version: 1.0
X-Received: by 10.52.103.35 with SMTP id ft3mr10325548vdb.5.1385138389649; Fri, 22 Nov 2013 08:39:49 -0800 (PST)
Received: by 10.220.198.199 with HTTP; Fri, 22 Nov 2013 08:39:49 -0800 (PST)
X-Originating-IP: [24.84.235.32]
In-Reply-To: <54E53D571E5E4589B2E9FA17DC816002@codalogic>
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> <54E53D571E5E4589B2E9FA17DC816002@codalogic>
Date: Fri, 22 Nov 2013 08:39:49 -0800
Message-ID: <CAHBU6itwNwAy__Yy3n2bGMjuZnXAhK+qNbLq36piFy666m-Cng@mail.gmail.com>
From: Tim Bray <tbray@textuality.com>
To: Pete Cordell <petejson@codalogic.com>
Content-Type: multipart/alternative; boundary="e89a8ff24d9bae24f604ebc6a965"
Cc: John Cowan <cowan@mercury.ccil.org>, Paul Hoffman <paul.hoffman@vpnc.org>, JSON WG <json@ietf.org>, Henri Sivonen <hsivonen@hsivonen.fi>, "Joe Hildebrand (jhildebr)" <jhildebr@cisco.com>, "www-tag@w3.org" <www-tag@w3.org>, es-discuss <es-discuss@mozilla.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 16:40:00 -0000

I’ve been using JSON for quite a few years, but hardly ever in either a
to-browser or from-browser role; what I care about is mostly its use in
RESTful APIs generally and identity APIs specifically.  In those scenarios,
it would be seen as wildly inappropriate to use anything but UTF-8; I’ve
never actually seen anything else.  In practice, it would be very unlikely
for anyone to deploy UTF-16 or any other non-UTF-8 flavor in a non-browser
scenario.

Having said that, I’m still, hundreds of messages later, not 100% sure what
our draft should say about BOMs :(


On Fri, Nov 22, 2013 at 3:33 AM, Pete Cordell <petejson@codalogic.com>wrote:

> ----- 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
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>