[Json] Another json interop soft spot

Tim Bray <tbray@textuality.com> Thu, 23 April 2015 16:26 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 1CFD91A6F29 for <json@ietfa.amsl.com>; Thu, 23 Apr 2015 09:26:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.522
X-Spam-Level:
X-Spam-Status: No, score=0.522 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_45=0.6, RCVD_IN_DNSWL_LOW=-0.7] 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 dbeqFjcBQAsC for <json@ietfa.amsl.com>; Thu, 23 Apr 2015 09:26:43 -0700 (PDT)
Received: from mail-yh0-f49.google.com (mail-yh0-f49.google.com [209.85.213.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0246F1A1EF5 for <json@ietf.org>; Thu, 23 Apr 2015 09:26:15 -0700 (PDT)
Received: by yhcb70 with SMTP id b70so3230092yhc.0 for <json@ietf.org>; Thu, 23 Apr 2015 09:26:14 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=ZlJWtKJ3xpDbyUjfSPe4/smWbETC2ZfYBYLWlebCo1Q=; b=KFlopEXGiSTZfGDDImbSJmR3bXiX2boJNn9EqL3NKtlI6mNpShXHrhRIigoYzgfZCg 0PDw00QZypfxzu5WoYrQVaikzEewJgqzcF9eEzG77kli+jBhyV1laUwSBqagCs+tvaOY LI+vM2YIho4bxK78Y5ex5VcIWBUcRVaXvxkbAsrcnqBmdnisQcXr5DVVlN/oCmOtBTMX WtTLwTJFwouoUAsW+UuRQRG3R8EWZq21LrPvdgsMT258g3s+qtXDgbDUBtFf8f1TkXXe augGEhQh7H2N9by3laH4dFV7Dw7s24/dTj2ZhAYUtvsKeslkMmBHCA7xGrS8TTgjC8Jz ypZg==
X-Gm-Message-State: ALoCoQn78O3Y6+Otd9ktQ3U3aIbmBSpI6kqK2f+DSxTMEp3g3tT0YZH57JMdnGDo8T/+dyK3Uvbx
MIME-Version: 1.0
X-Received: by 10.236.19.71 with SMTP id m47mr3032007yhm.106.1429806374325; Thu, 23 Apr 2015 09:26:14 -0700 (PDT)
Received: by 10.129.137.69 with HTTP; Thu, 23 Apr 2015 09:26:13 -0700 (PDT)
X-Originating-IP: [67.132.130.174]
Received: by 10.129.137.69 with HTTP; Thu, 23 Apr 2015 09:26:13 -0700 (PDT)
Date: Thu, 23 Apr 2015 09:26:13 -0700
Message-ID: <CAHBU6iu1ndbw9V_D3yyxY_FiaBgtD9=94_Rgcra_RJ_WTLVqRA@mail.gmail.com>
From: Tim Bray <tbray@textuality.com>
To: json@ietf.org
Content-Type: multipart/alternative; boundary="089e0160c7040a28dc051466bd73"
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/h-k_hIHi2NBtX0igyYb7YNgiKug>
Subject: [Json] Another json interop soft spot
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: Thu, 23 Apr 2015 16:26:47 -0000

irb(main):004:0> JSON.parse ' {"a\b": "b"}'

=> {"a\b"=>"b"}

irb(main):005:0> JSON.parse ' {"a\\b": "b"}'

=> {"a\b"=>"b"}

I think the first example is probably illegal per the grammar, but I bet
lots of parsers accept it.