Re: [Json] In "praise" of UTF-16

Anders Rundgren <anders.rundgren.net@gmail.com> Tue, 03 September 2019 05:46 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 55E9312010F for <json@ietfa.amsl.com>; Mon, 2 Sep 2019 22:46:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 MYi0CaYm25fU for <json@ietfa.amsl.com>; Mon, 2 Sep 2019 22:46:07 -0700 (PDT)
Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 7D9DD1200FB for <json@ietf.org>; Mon, 2 Sep 2019 22:46:07 -0700 (PDT)
Received: by mail-wr1-x432.google.com with SMTP id t16so15970407wra.6 for <json@ietf.org>; Mon, 02 Sep 2019 22:46:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=MrKQTfrTu3IozDgsRFdvkaZZ11DdrutumWbkTRVXaLc=; b=Yevzox2LZO3G8VLB5CjjnPQgS2aF0lBVMlSYhbGu7zfHan4vfsHMhIXDKjgakH033L z/O2A/JfJVwMfsv6E/J9SmgxsgDeFhWpmlSMBti5yFSPJklMbZl8BvxGvjPhqOGF/XDl jPkGa9PKdUp3Mu1YDHd2Sx+91SFc+l2ewn2IMRCFS2MQd6dv5AIq+mw+ewmgIdbVrp/7 XPpSV3dRagTFwqnJhb2jOF8I+meDFg4168/xgwmaltzij+0/av+VKFeM3v3r3+cHCmKh +ybwaLT6AzJGk12JlaBe6krg2zK8banQW6StE/J+iszzMmb0EcYENcXM4nZTaTxcPGX/ TxOQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MrKQTfrTu3IozDgsRFdvkaZZ11DdrutumWbkTRVXaLc=; b=WTsx7tYrXCo3SX+FfCfwsLbI/pwKo9mdwXHlFnMxu1z2VEpPRRF+YC/0+tuOS73LrK MoGgiiP1QYuycvRfPpfApyaaX7WkN9hV51X9L1kP88vJ/WI8l07kuIYA3iQ2bH2tYJyO DC3CVt14Byoa9qr+IQBLZF0+O3dyvWUE6XRx/SAp7lWfK08crM7KbeU2nmaXhRE+t4Et vw0C7pdnkaqXRMJqwfCu9RV20pRkhGlfW4psXei6ThiJrBLyA8rAbx6u7lq2KMbRHo19 h0cyamqPzGjby2hcXLPRh0p8Qgw7BU3WBXN+9inAA1z3W1LWLuM246rmbevl0mKfqFRm gnNg==
X-Gm-Message-State: APjAAAW5s23XKmemICQU4blWjpgSTnzXTfhIVpni7WZ8udOTXNFsjNNS 6XqKP8A8RusSzCZV3bu4zZWXwYaL
X-Google-Smtp-Source: APXvYqw+zt1KIqBm4RM/6oqZmo1S5qOp3v2CYA8gjr5GbMALBFeS3pTNuNMxQl3pIiJxNnXRRLq8FQ==
X-Received: by 2002:a5d:6ac8:: with SMTP id u8mr4299021wrw.104.1567489565375; Mon, 02 Sep 2019 22:46:05 -0700 (PDT)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id q14sm36144042wrc.77.2019.09.02.22.46.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Sep 2019 22:46:04 -0700 (PDT)
From: Anders Rundgren <anders.rundgren.net@gmail.com>
To: "json@ietf.org" <json@ietf.org>
References: <cc3dc24d-3e13-e319-e48f-7b52ddd017d0@gmail.com> <00231270-86DF-4AD2-949E-25B04D518577@tzi.org> <20190902211744.GA7920@localhost> <40386571-301A-47BD-937D-55666566CFB5@tzi.org> <20190902214047.GB7920@localhost> <bde7a24d-8ae7-45e3-c8d8-86e9075c7f9b@gmail.com>
Message-ID: <2086bfc5-aa63-80ed-1a11-c0f770d1480d@gmail.com>
Date: Tue, 03 Sep 2019 07:46:01 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <bde7a24d-8ae7-45e3-c8d8-86e9075c7f9b@gmail.com>
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/tTHIl47zi2WrSRZKeY0cjLgs8F8>
Subject: Re: [Json] In "praise" of UTF-16
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 03 Sep 2019 05:46:10 -0000

The (IMO) only real problem with JCS is in Appendix E:
https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-06#appendix-E

Why is that?  Because you typically expect tools and libraries to do all the gory stuff.

In this particular case a part of the canonicalization process may spill over to the application.
There are easy workarounds but workarounds is always a source of problems.

IF JCS gets firm adoption this problem could be more or less nullified but that's another story.

thanx,
Anders