Re: [Json] Support for "\/" in ECMA versus I-JSON?

Anders Rundgren <anders.rundgren.net@gmail.com> Sun, 19 November 2017 05:54 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 97EC1126B71 for <json@ietfa.amsl.com>; Sat, 18 Nov 2017 21:54:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 JXGC2T0kHSd0 for <json@ietfa.amsl.com>; Sat, 18 Nov 2017 21:54:41 -0800 (PST)
Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (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 00DC4124D37 for <json@ietf.org>; Sat, 18 Nov 2017 21:54:40 -0800 (PST)
Received: by mail-wm0-x22a.google.com with SMTP id b189so13110943wmd.0 for <json@ietf.org>; Sat, 18 Nov 2017 21:54:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3gqI1VcZna4GA812GJFnCuSUxt5JEoAeIzUTTytQHhY=; b=HdlimA5kp3ZBFQ78ZmWUhm4CBYaWrAa5Z4X1Tw0T5KFqIf3frIBWWeOtLzo1GO1+mx dzNxdokAhJapuSOFc3kjMTXPvoAMCdU9tsfDvyV1KZCMPucyqHPwteoQHxwbHikv2LtW iVUKHgljpAVWSLO002dhRxXu1LlSd3UXXEkdQVYhu2q+UmTvxMsYbZkUZ8mHAzNF0Hvl 36oQMzZWAfxIfMRbn5oL8CjWbsRtCx3qD9G83p9g+v+g6TmQ3ei/2xafxHeD84tfYCbd uQaLPZ9H2flPXGrS6i3q1dBiYHlBR0emozSQnJzyvj/I0+H/pqFN6BkkTq213wWReDkK 994w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3gqI1VcZna4GA812GJFnCuSUxt5JEoAeIzUTTytQHhY=; b=cp19g68mWaghhQRlbKA7UhD2rzaAhxZ1Wbw01zvI8noFlepySIxkmALP/QKMm5aOW8 JThVFt6x+g3KeDjypBSswPJOYOn0AjO8KIb0lOFNPaT7KHqzOseNfKIxTBTgCDfENLX8 ri6cOPjjXi5TnWpbYQLLBIFiXohUAljpgV82BCvfFx46dxRnSQbOup5eSrESiEztXoDc /QNu6EP8hREkaL1jG1oU2ERm3nAvtBRRT46l9BcRm9PX9DYjI2XPHW16k4FBvB9noCiA cwBA4vQ8oTrlzOch4M7awQbojOZ6xtgQkWHe88n46LYAQfs0iT94hOoYOLvcl6O8AUtz Y9cA==
X-Gm-Message-State: AJaThX5MrBZ2BegFIxmWfxKS854cZiVyumU+SM6Plwqu5PDSHfYq0ftO 9VeLfryQ/cKg2ErqZ9WV/EKlaA==
X-Google-Smtp-Source: AGs4zMa9b9qtuejv71w6Hl/E6ZYvyDwgLfe2aah4ueMRGDYvEGOWa+T47YdAhd20Xfu3dq9nmWG8Zg==
X-Received: by 10.80.159.239 with SMTP id c102mr11475855edf.46.1511070879155; Sat, 18 Nov 2017 21:54:39 -0800 (PST)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id z1sm6392039edz.17.2017.11.18.21.54.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Nov 2017 21:54:38 -0800 (PST)
To: Paul Hoffman <paul.hoffman@vpnc.org>
Cc: json@ietf.org
References: <150047191184.7507.7143481683564082881@ietfa.amsl.com> <DB9BA7EA-D393-4079-B347-620A09280B26@isode.com> <CAC4RtVBYMrRCrUZ1qqD+_rH4M8N23GOgbbh=921fEYqH+gCm5Q@mail.gmail.com> <c06e583a-965e-9eaf-975f-e6876ac056ed@filament.com> <f1a6b553-c787-e248-67bd-74d68d98a845@gmx.de> <262E8314-263A-4443-B912-AFCF1A3277B2@tzi.org> <166957c4-26fc-90b5-a798-59280c91b466@filament.com> <8B60039F-96DD-4F72-8139-D80B6F11566C@tzi.org> <3760a157-5b88-e334-712c-03eecd675794@codalogic.com> <7a88952c-3e46-3f87-b3c2-2864f216c62d@gmail.com> <9cddf2e7-f987-3942-3580-05c3da6a4805@codalogic.com> <2892a0eb-0bd2-cd2e-87e7-aa2e29009b4b@filament.com> <fb700d81-5ed9-c0aa-1ace-71554c516a69@gmail.com> <5396066D-231C-4602-8D81-6646FDD18AD5@vpnc.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <7fad48ca-c0de-5831-8163-c7d3e9842c7f@gmail.com>
Date: Sun, 19 Nov 2017 06:54:35 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <5396066D-231C-4602-8D81-6646FDD18AD5@vpnc.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/RFPClnHz-ALz7sxehvTWhdlWg_E>
Subject: Re: [Json] Support for "\/" in ECMA versus I-JSON?
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.22
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: <https://mailarchive.ietf.org/arch/browse/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: Sun, 19 Nov 2017 05:54:43 -0000

On 2017-11-19 00:23, Paul Hoffman wrote:
> On 18 Nov 2017, at 7:54, Anders Rundgren wrote:
> 
>> It is [quite] possible that I got lost in ECMA's gigantic spec but I
>> can't find any support for the "\/" escape in there but it surely is
>> in I-JSON.
>>
>> WDYT?
> 
> You may be viewing the wrong spec.

Indeed I was. Pardon.

> http://www.ecma-international.org/publications/standards/Ecma-404.htm is
> only 14 pages. The escape you are looking for is in Section 9, on page
> 4.

As noted by Tim the \/ escape is just a relic and not used in JSON serializations
https://www.ecma-international.org/ecma-262/8.0/index.html#sec-quotejsonstring
which got me to (incorrectly) believe it had been removed for parsing as well.

BTW, this document (Ecma-262) is actually quite interesting from an "JSON-I"
point of view since you by adhering to it for JSON parsing and serialization,
without any additional work, get a "normalized" JSON representation fully
usable for digitally signatures.  The current signature standard (JWS) has
unfortunately prompted a flurry of "DIY standards" to overcome the need for
dressing signed JSON messages in Base64Url.

Anders