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

Anders Rundgren <anders.rundgren.net@gmail.com> Wed, 04 September 2019 05:18 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 5FBF8120090 for <json@ietfa.amsl.com>; Tue, 3 Sep 2019 22:18:46 -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 IehD8u1olUwY for <json@ietfa.amsl.com>; Tue, 3 Sep 2019 22:18:44 -0700 (PDT)
Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 83FBC12001E for <json@ietf.org>; Tue, 3 Sep 2019 22:18:44 -0700 (PDT)
Received: by mail-wm1-x333.google.com with SMTP id q19so1744115wmc.3 for <json@ietf.org>; Tue, 03 Sep 2019 22:18:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dUhwrdHSUIe1rOkeGzwysjcBh6I0hXhAffQSTpNY8c0=; b=aUESmOHJ8JEP8GhnWcCzbm36Lkw0HhN0+qYJ5on/wz7QNodEEbzrInUM7pRfFo7vHe Clx1+Z49qITzwXysqn4xWh9T+y7v3INLRx7LWJCUdafquNXhpEOWYnOo2H7RF4lkX/te SQ0tezv8R3P+CbhJhEmlj4G4J02+0juSar3rXz6yITLt7rUoQdh13GWBJm1Zq35zIaYo nuO2QuJKbkWGdAXnmZInPK46kXS70mwyCqMcqlIlvvEzn0jUY3eRJr7jn8rTsAsUT7xo HfVxTMUnRg0hrT2l+aWEDcsPGLbAJ/JjByShKAFkTJIaHkyakb06U5guoWr/SXNmKKLB 2s6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dUhwrdHSUIe1rOkeGzwysjcBh6I0hXhAffQSTpNY8c0=; b=DLR6z5gAaQ2GjRKRUQncPBTx1PbDOuHTAuGR94wz/kjrq/YlCHcAX1Eq0bvg9oCWdg lslNfxqBLqPNW5munEwADhNLVmWhDaGEqr7pWZlRaGe8cfrHBTxTeLkBwrcdblwKItVd xh3uRp+/ctEqml3LJkx38hQZo4ggqtXWqxX7h2UB0B2Ic6I6fF1A1ue7D735Sqdgat0r CSUw7xRJinyNWuBGd++XbZFCfE2P9gABKpacRpbRKCsJikYXi5oAXQK1szps089lIiir Z1wXUEgk/JJJJb6e03bTqj1maScacxt/dQRQAFng+5Er/+rB6zhMkwi20ITmGUXGubI/ 4XhQ==
X-Gm-Message-State: APjAAAUJ6IvBqd6Nuwps5bshHrtpdoHQ00nU7Bc8fzGkouvOEEeFodNF 4hQvmuFNZIrkj+h/+kJHIIff40QH
X-Google-Smtp-Source: APXvYqyK/dAZ+oej9EpQ/wppc/FY9KKwEcSbKUuim+nfS7LelAIsDJCJ5QnCkrgO/Ng7PLMw6EAZgg==
X-Received: by 2002:a1c:4b16:: with SMTP id y22mr2624770wma.55.1567574322673; Tue, 03 Sep 2019 22:18:42 -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 e30sm30789256wra.48.2019.09.03.22.18.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Sep 2019 22:18:41 -0700 (PDT)
From: Anders Rundgren <anders.rundgren.net@gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: "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> <2086bfc5-aa63-80ed-1a11-c0f770d1480d@gmail.com> <DC5F04D0-D88A-410A-8688-85CDA7A85D05@tzi.org>
Message-ID: <ca487bf8-5ba3-3705-db29-572a3b5bba14@gmail.com>
Date: Wed, 04 Sep 2019 07:18:39 +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: <DC5F04D0-D88A-410A-8688-85CDA7A85D05@tzi.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/v0YUEkag93Z1KUvRY0RDfYRtyn8>
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: Wed, 04 Sep 2019 05:18:47 -0000

On 2019-09-03 08:00, Carsten Bormann wrote:
> Any deterministic encoding scheme always has an application layer canonicalization issue.
> It’s just slightly worse for (I-)JSON because its generic data model has so few common data types, so more work is at the application layer, mapping to those data types.

A schema based system could manage this in a for the application developer transparent way at the expense of an additional backing string variable for each emulated data type.

Anders

> 
> Grüße, Carsten
> 
> 
>> On Sep 3, 2019, at 07:46, Anders Rundgren <anders.rundgren.net@gmail.com> wrote:
>>
>> 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
>>
>> _______________________________________________
>> json mailing list
>> json@ietf.org
>> https://www.ietf.org/mailman/listinfo/json
>>
> 
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>