Re: [Json] BOMs

Henri Sivonen <hsivonen@hsivonen.fi> Thu, 21 November 2013 13:28 UTC

Return-Path: <hsivonen@hsivonen.fi>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0ED6B1AE14A for <ietf@ietfa.amsl.com>; Thu, 21 Nov 2013 05:28:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.779
X-Spam-Level:
X-Spam-Status: No, score=-0.779 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_45=0.6, SPF_PASS=-0.001] 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 ZOxUZWhjKfwB for <ietf@ietfa.amsl.com>; Thu, 21 Nov 2013 05:28:50 -0800 (PST)
Received: from mail-oa0-x22c.google.com (mail-oa0-x22c.google.com [IPv6:2607:f8b0:4003:c02::22c]) by ietfa.amsl.com (Postfix) with ESMTP id A462F1AE151 for <ietf@ietf.org>; Thu, 21 Nov 2013 05:28:50 -0800 (PST)
Received: by mail-oa0-f44.google.com with SMTP id m1so4063643oag.17 for <ietf@ietf.org>; Thu, 21 Nov 2013 05:28:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hsivonen.fi; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ig2MCEbxmK/rXQSvjwaofDWQh3u3p95ewpuNubPKIG0=; b=i2cRGqdPBbYJivIf1N0yoyVMwuZuSHud7+x9ndaw6XBC0ETTykhalJDkDY6HOnvtjY nJysfLZ92wBgZaUjhgKaawOgp0FPs8lQ6Obm54zRsdK4lSDo3Ko59YtWiRzmqC/m4610 N513Wxd79cB/iXTrnZwYZ8zPz4VyUC6jWx42c=
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=ig2MCEbxmK/rXQSvjwaofDWQh3u3p95ewpuNubPKIG0=; b=X26NiMSePq6ry9fl62of4ZnbtDoaOo8s36F8aOIYPC14/a2hnDvEz6UkVV3cbVqUQt L8c6l63FVs9QQN18JUCyqdlC09zBGsgyYI7Iu50bKPStqqZXzHBumllZyku9SHQz0Cdn 2SlwQBySB1R7FF6gi/U6ZbhGMLlRCm4AMRsOm42lqDeeRQVLpylSjZvDpSOzBYTS29qd YL4LxxGOpFkzh8xTaDJxJfc3tpr3BWkShpPift2UEN/usyqfHH14lWGeGxPQn843yMhS k0tzO0u8KJm/fF+iX9A5zuOY9gyP+8YmxwUlptoRGjrX+VMS1rGxixnj+gSD7dNTCcpO KYoQ==
X-Gm-Message-State: ALoCoQk4FsOYlCsOHVRLefj9/tbZB+29J3CmxGAQESBSWgtc+BrAubZudrZ5ldHU8R6oeXHHdEuC
MIME-Version: 1.0
X-Received: by 10.182.60.233 with SMTP id k9mr5599104obr.34.1385040523782; Thu, 21 Nov 2013 05:28:43 -0800 (PST)
Received: by 10.182.119.130 with HTTP; Thu, 21 Nov 2013 05:28:43 -0800 (PST)
In-Reply-To: <A20405C4-F7AA-4141-AE19-222708A096F7@wirfs-brock.com>
References: <AA45B3C6-1DC5-4B1E-8045-C9FE76022584@vpnc.org> <CEA92854.2CC53%jhildebr@cisco.com> <20131113224737.GI31823@mercury.ccil.org> <f5bob5n71y7.fsf@troutbeck.inf.ed.ac.uk> <5284B095.4070004@it.aoyama.ac.jp> <C37B2FE59C164DBCA982AC81A56A09AA@codalogic> <f5bk3g6ufqy.fsf@troutbeck.inf.ed.ac.uk> <5289F974.9020709@it.aoyama.ac.jp> <020401cee50f$a2cdf5c0$4001a8c0@gateway.2wire.net> <528B46EA.4040503@it.aoyama.ac.jp> <43255615-2FC9-4726-99FD-1B13D6B1F033@wirfs-brock.com> <f5br4ackyqm.fsf@troutbeck.inf.ed.ac.uk> <528C5445.3050600@it.aoyama.ac.jp> <A20405C4-F7AA-4141-AE19-222708A096F7@wirfs-brock.com>
Date: Thu, 21 Nov 2013 15:28:43 +0200
Message-ID: <CANXqsR+KwYJyZgCLB+b7P6O3=EgY3io-XwvuBLsfWOQ8zbp8Ww@mail.gmail.com>
Subject: Re: [Json] BOMs
From: Henri Sivonen <hsivonen@hsivonen.fi>
To: Allen Wirfs-Brock <allen@wirfs-brock.com>
Content-Type: text/plain; charset="UTF-8"
X-Mailman-Approved-At: Thu, 21 Nov 2013 09:19:28 -0800
Cc: John Cowan <cowan@mercury.ccil.org>, "Henry S. Thompson" <ht@inf.ed.ac.uk>, Pete Cordell <petejson@codalogic.com>, JSON WG <json@ietf.org>, www-tag <www-tag@w3.org>, es-discuss <es-discuss@mozilla.org>, Anne van Kesteren <annevk@annevk.nl>, IETF Discussion <ietf@ietf.org>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Nov 2013 13:28:52 -0000

On Thu, Nov 21, 2013 at 7:53 AM, Allen Wirfs-Brock
<allen@wirfs-brock.com> wrote:
> Just to be clear about this.  My tests directly tested JavaScript built-in
> JSON parsers WRT to BOM support in three major browsers.  The tests directly
> invoked the built-in JSON.parse functions and directly passed to them a
> source strings that was explicitly constructed to contain a BOM code point .
> This was done to ensure that the all transport layers  (and any transcodings
> they might perform) were bypassed and that we were actually testing the real
> built-in JSON parse functions.

It would be surprising if JSON.parse() accepted a BOM, since it
doesn't take bytes as input.

However, XHR's responseType = "json" exercises browsers in a way where
the input is bytes from the network. From the perspective of JSON
support in XHR,
http://lists.w3.org/Archives/Public/www-tag/2013Nov/0149.html (which
didn't reach the es-discuss part of this thread previously) applies.

-- 
Henri Sivonen
hsivonen@hsivonen.fi
http://hsivonen.fi/