Re: [Json] BOMs
Tatu Saloranta <tsaloranta@gmail.com> Mon, 18 November 2013 19:01 UTC
Return-Path: <tsaloranta@gmail.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 690C31AD62B; Mon, 18 Nov 2013 11:01:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.501
X-Spam-Level:
X-Spam-Status: No, score=0.501 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, J_CHICKENPOX_14=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 jg1NjCcWATEu; Mon, 18 Nov 2013 11:01:26 -0800 (PST)
Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) by ietfa.amsl.com (Postfix) with ESMTP id 594211AE068; Mon, 18 Nov 2013 10:59:54 -0800 (PST)
Received: by mail-wi0-f169.google.com with SMTP id hj6so312952wib.4 for <multiple recipients>; Mon, 18 Nov 2013 10:59:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kkmj1TuVT/nthZmqkfzypgax4e5VI6HBW30Zns9mf7w=; b=FuDBDUoNFsRi5k1x+WXDPiZItOgA933e3BoS2U8AP+MVjRGCRkpaYyn7zKEh8pqEeA gQzmqcpWa8UUZRBS+lpV983E9eoLUwdHLuxkxaao+9f2snS4VEVWaNel+7fOJri/qAgd 3+Ezw6El9Jx8+Df9YBYTm9g+iEx5jIknGRppOp1wVaExyKP2vf8fCh+O3ISoNct/GmNy ZFFFpjZRyraFK+NRcACNS1pdRT2Mvgaw9upt4nM0l32bY07Cc0qTB1yjAWOrFQwK6iiY gvsWvEAEGxxgIw7NiBXbMXhyPvhB2Eve+jlyozG2I4p1S9LNQaVoR9V7tNVkX4Nh3Tke 8MDQ==
MIME-Version: 1.0
X-Received: by 10.180.187.113 with SMTP id fr17mr17726387wic.35.1384801188109; Mon, 18 Nov 2013 10:59:48 -0800 (PST)
Received: by 10.227.61.195 with HTTP; Mon, 18 Nov 2013 10:59:48 -0800 (PST)
In-Reply-To: <2tuj89hcus182t4f4rqqgi1dpabt11qak7@hive.bjoern.hoehrmann.de>
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> <2tuj89hcus182t4f4rqqgi1dpabt11qak7@hive.bjoern.hoehrmann.de>
Date: Mon, 18 Nov 2013 10:59:48 -0800
Message-ID: <CAGrxA27HM6P=C4GvGgzpBNVOrFg0Vgfn02e5n3-irQUCfZZJPg@mail.gmail.com>
From: Tatu Saloranta <tsaloranta@gmail.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Content-Type: multipart/alternative; boundary="001a11c383b2e6e15404eb7826e9"
Cc: IETF Discussion <ietf@ietf.org>, JSON WG <json@ietf.org>, "Martin J. Dürst" <duerst@it.aoyama.ac.jp>, Anne van Kesteren <annevk@annevk.nl>, "www-tag@w3.org" <www-tag@w3.org>, es-discuss <es-discuss@mozilla.org>
Subject: Re: [Json] BOMs
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: Mon, 18 Nov 2013 19:01:28 -0000
Dominant Java implementations support UTF-16 with BOM; either directly or through Java's Reader implementations that handle BOMs. String concatenation case seems irrelevant, since BOMs are not included in in-memory representation anyway, as opposed to byte stream serialization. -+ Tatu +- On Mon, Nov 18, 2013 at 4:35 AM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote: > * Martin J. Dürst wrote: > >As for what to say about whether to accept BOMs or not, I'd really want > >to know what the various existing parsers do. If they accept BOMs, then > >we can say they should accept BOMs. If they don't accept BOMs, then we > >should say that they don't. > > Unicode signatures are not useful for application/json resources and are > likely to break exisiting and future code, it is not at all uncommon to > construct JSON text by concatenating, say, string literals with some web > service response without passing the data through a JSON parser. And as > RFC 4627 makes no mention of them, there is little reason to think that > implementations tolerate them. > > Perl's JSON module gives me > > malformed JSON string, neither array, object, number, string > or atom, at character offset 0 (before "\x{ef}\x{bb}\x{bf}[]") > > Python's json module gives me > > ValueError: No JSON object could be decoded > > Go's "encoding/json" module gives me > > invalid character 'ï' looking for beginning of value > > http://shadowregistry.org/js/misc/#t2ea25a961255bb1202da9497a1942e09 is > another example of what kinds of bugs await us if we were to specify the > use of Unicode signatures for JSON, essentially > > new DOMParser().parseFromString("\uBBEF\u3CBF\u7979\u3E2F","text/xml") > > Now U+BBEF U+3CBF U+7979 U+3E2F is not an XML document but Firefox and > Internet Explorer treat it as if it were equivalent to "<yy/>". > -- > 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/ > _______________________________________________ > json mailing list > json@ietf.org > https://www.ietf.org/mailman/listinfo/json >
- Re: [Json] JSON: remove gap between Ecma-404 and … Paul Hoffman
- Re: [Json] JSON: remove gap between Ecma-404 and … Joe Hildebrand (jhildebr)
- Re: [Json] JSON: remove gap between Ecma-404 and … Carsten Bormann
- Re: [Json] JSON: remove gap between Ecma-404 and … Joe Hildebrand (jhildebr)
- Re: [Json] JSON: remove gap between Ecma-404 and … Tony Hansen
- Re: [Json] JSON: remove gap between Ecma-404 and … Paul Hoffman
- Re: [Json] JSON: remove gap between Ecma-404 and … Allen Wirfs-Brock
- Re: [Json] JSON: remove gap between Ecma-404 and … Carsten Bormann
- Re: [Json] JSON: remove gap between Ecma-404 and … Joe Hildebrand
- Re: [Json] JSON: remove gap between Ecma-404 and … Joe Hildebrand (jhildebr)
- Re: [Json] JSON: remove gap between Ecma-404 and … Paul Hoffman
- Re: [Json] JSON: remove gap between Ecma-404 and … John Cowan
- Re: [Json] JSON: remove gap between Ecma-404 and … Joe Hildebrand (jhildebr)
- Re: [Json] JSON: remove gap between Ecma-404 and … Mark Davis ☕
- Re: [Json] JSON: remove gap between Ecma-404 and … John Cowan
- Re: [Json] JSON: remove gap between Ecma-404 and … Allen Wirfs-Brock
- Re: [Json] JSON: remove gap between Ecma-404 and … Paul Hoffman
- Re: [Json] Encoding detection John Cowan
- Re: [Json] JSON: remove gap between Ecma-404 and … Martin J. Dürst
- [Json] Encoding detection (Was: Re: JSON: remove … Pete Cordell
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Joe Hildebrand (jhildebr)
- Re: [Json] JSON: remove gap between Ecma-404 and … John Cowan
- Re: [Json] JSON: remove gap between Ecma-404 and … Henry S. Thompson
- Re: [Json] JSON: remove gap between Ecma-404 and … Allen Wirfs-Brock
- Re: [Json] JSON: remove gap between Ecma-404 and … Allen Wirfs-Brock
- Re: [Json] Encoding detection Henry S. Thompson
- Re: [Json] Encoding detection John Cowan
- Re: [Json] Encoding detection David Booth
- Re: [Json] Encoding detection Martin J. Dürst
- Re: [Json] Encoding detection Henry S. Thompson
- Re: [Json] Encoding detection Pete Cordell
- Re: [Json] Encoding detection Paul Hoffman
- Re: [Json] Encoding detection Bjoern Hoehrmann
- Re: [Json] Encoding detection Paul Hoffman
- [Json] BOMs (Was: Re: JSON: remove gap between Ec… Pete Cordell
- Re: [Json] Encoding detection Pete Cordell
- Re: [Json] BOMs Henry S. Thompson
- Re: [Json] BOMs Martin J. Dürst
- Re: [Json] BOMs Bjoern Hoehrmann
- Re: [Json] BOMs Henry S. Thompson
- Re: [Json] BOMs Pete Cordell
- Re: [Json] BOMs Bjoern Hoehrmann
- Re: [Json] BOMs (Was: Re: JSON: remove gap betwee… Tim Bray
- Re: [Json] BOMs (Was: Re: JSON: remove gap betwee… Pete Cordell
- Re: [Json] BOMs John Cowan
- Re: [Json] BOMs (Was: Re: JSON: remove gap betwee… Julian Reschke
- Re: [Json] BOMs (Was: Re: JSON: remove gap betwee… John Cowan
- Re: [Json] BOMs (Was: Re: JSON: remove gap betwee… Pete Cordell
- Re: [Json] BOMs (Was: Re: JSON: remove gap betwee… Pete Cordell
- Re: [Json] BOMs (Was: Re: JSON: remove gap betwee… John Cowan
- Re: [Json] BOMs Tatu Saloranta
- Re: [Json] BOMs Phillip Hallam-Baker
- Re: [Json] BOMs Martin J. Dürst
- Re: [Json] BOMs Martin J. Dürst
- Re: [Json] BOMs Pete Cordell
- Re: [Json] BOMs Bjoern Hoehrmann
- Re: [Json] BOMs t.p.
- Re: [Json] BOMs Allen Wirfs-Brock
- Re: [Json] BOMs Tatu Saloranta
- Re: [Json] BOMs Henry S. Thompson
- Re: [Json] BOMs Joe Hildebrand (jhildebr)
- Re: [Json] BOMs Chris Lilley
- Re: [Json] BOMs Pete Cordell
- Re: [Json] BOMs Henry S. Thompson
- Re: [Json] BOMs Martin J. Dürst
- Re: [Json] BOMs Henry S. Thompson
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Henri Sivonen
- Re: [Json] Encoding detection (Was: Re: JSON: rem… John Cowan
- Re: [Json] BOMs Allen Wirfs-Brock
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Henri Sivonen
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Anne van Kesteren
- Re: [Json] BOMs Henri Sivonen
- Re: [Json] Encoding detection (Was: Re: JSON: rem… John Cowan
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Joe Hildebrand (jhildebr)
- Re: [Json] BOMs Allen Wirfs-Brock
- Re: [Json] BOMs Bjoern Hoehrmann
- Re: [Json] BOMs Mathias Bynens
- Re: [Json] BOMs John Cowan
- Re: [Json] BOMs Bjoern Hoehrmann
- Re: [Json] BOMs Nico Williams
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Henri Sivonen
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Pete Cordell
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Julian Reschke
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Robin Berjon
- Re: [Json] Encoding detection (Was: Re: JSON: rem… John Cowan
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Tim Bray
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Allen Wirfs-Brock
- [Json] Consensus on JSON-text (WAS: JSON: remove … Matt Miller (mamille2)
- Re: [Json] BOMs Matt Miller (mamille2)
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Matt Miller (mamille2)
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Julian Reschke
- Re: [Json] BOMs Bjoern Hoehrmann
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Bjoern Hoehrmann
- Re: [Json] Encoding detection (Was: Re: JSON: rem… John Cowan
- Re: [Json] Encoding detection (Was: Re: JSON: rem… John Cowan
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Matt Miller (mamille2)
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Pete Cordell
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Pete Cordell
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Martin J. Dürst
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Allen Wirfs-Brock
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Bjoern Hoehrmann
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Henri Sivonen
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Nico Williams
- Re: [Json] Encoding detection (Was: Re: JSON: rem… John Cowan
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Jacob Davies
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Nico Williams
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Julian Reschke
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Nico Williams
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Carsten Bormann
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Nico Williams
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Carsten Bormann
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Nico Williams
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Bjoern Hoehrmann
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Nico Williams
- Re: [Json] Encoding detection (Was: Re: JSON: rem… Henri Sivonen
- Re: [Json] Encoding detection (Was: Re: JSON: rem… John Cowan
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Tim Bray
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Alex Russell
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Paul Hoffman
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… John Cowan
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Carsten Bormann
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Tim Bray
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Phillip Hallam-Baker
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Joe Hildebrand (jhildebr)
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Carsten Bormann
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Tim Berners-Lee
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Carsten Bormann
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Allen Wirfs-Brock
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Noah Mendelsohn
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Phillip Hallam-Baker
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Ashok Malhotra
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Nico Williams
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Phillip Hallam-Baker
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Phillip Hallam-Baker
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… John Cowan
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Alex Russell
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… Nico Williams
- Re: [Json] Consensus on JSON-text (WAS: JSON: rem… John Cowan