Re: [Cbor] Status of Appendix A in RFC 8949

Anders Rundgren <anders.rundgren.net@gmail.com> Fri, 05 May 2023 10:57 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 21DFDC151990 for <cbor@ietfa.amsl.com>; Fri, 5 May 2023 03:57:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.099
X-Spam-Level:
X-Spam-Status: No, score=-7.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, 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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Goay97IN1aFA for <cbor@ietfa.amsl.com>; Fri, 5 May 2023 03:57:21 -0700 (PDT)
Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BE8EAC15198F for <cbor@ietf.org>; Fri, 5 May 2023 03:57:21 -0700 (PDT)
Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f19ab994ccso16239705e9.2 for <cbor@ietf.org>; Fri, 05 May 2023 03:57:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683284240; x=1685876240; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=qGSLKbSkAzxV0w/0EiU2/zZk0iKd8th8N3LtRW0++q0=; b=ZPZGhYC3l+mgWZSJrCdIl3Nir/lplr8BrzZOL6MtzHURK7NgflvzfndgTYDS0rJaJZ R83K1jhvzEy2EKKZXLEbgSosZmL2zs6XLgaStJRuv/7rS3tVktWCpEB5SMF6PzlbJXK0 tYH8zT55KoGG5UIcUM0IDeBL7/h2OXSji3Bnoxkl2u8OO79yl+tD8ABSjYe8W2r4gQVY 9NFRXN6RA2cxdwmz98ahh9QtI6bWdmv9Cudz89jCLDSImFr9Vqos82E+x49bM4UzNbiC /KOjido36TFdIeOvJ4zETfjwU7Ji419VP3PeXFhl6SvfPIPD614a/CNNIM2XGIYL4mRE QU6Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683284240; x=1685876240; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qGSLKbSkAzxV0w/0EiU2/zZk0iKd8th8N3LtRW0++q0=; b=OIdmk1d1FI/4NRDUBJHfkxap4TL7CMrwg6vDbvIxLDfzgLTCANhRdLtBL3lXxbqOVp 9uN+NvzX3yBiJs055kSdFhn1WDzWxs6NIybCQJO1FXPjU+GIKBDhj/2SW7Y3nz4QrcND emN4KcrJh1+joEGctdqTzxVWHiLGNnu1JhnORSUVcwhUrMOshZVn0efI9y+i+YAV1RLM Ydo8z4RctV7JarjHTpFsxuKI2oJSqKpltrqdrfmOubPbIDsR7CEfCP+6wB7unedNznlS eWLBQZ3MK5JLYUl5xQLXl0QGLMkBadva0/2J/Qus3LE2TQMPO2Q5Dutc6V3KygzLq0K7 yU9A==
X-Gm-Message-State: AC+VfDzidUeoCEo3t4OVcelYoWEMKvD9/vh0I965OzJqzgvN3Gd10rN6 iqyJLhGSoEXJQABJwRWh3EAYmhO0t7I=
X-Google-Smtp-Source: ACHHUZ5AipGGYuVC6ENiZYhw3acAlNBxzWK6uy7xemUnaIaYW0j1ssBZHLD9nm16pgKBEXywukC5aQ==
X-Received: by 2002:a5d:4fcb:0:b0:304:75b1:4dff with SMTP id h11-20020a5d4fcb000000b0030475b14dffmr1024211wrw.48.1683284239975; Fri, 05 May 2023 03:57:19 -0700 (PDT)
Received: from ?IPV6:2a01:e34:ec4e:5670:b310:ae53:9c1e:16cc? ([2a01:e34:ec4e:5670:b310:ae53:9c1e:16cc]) by smtp.googlemail.com with ESMTPSA id y6-20020a1c4b06000000b003f17131952fsm7599254wma.29.2023.05.05.03.57.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 May 2023 03:57:19 -0700 (PDT)
Message-ID: <37b5a9ab-e28c-c4e7-3c60-6faa4049de28@gmail.com>
Date: Fri, 05 May 2023 12:57:19 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1
Content-Language: en-US
To: Carsten Bormann <cabo@tzi.org>
Cc: cbor@ietf.org
References: <8233a692-df84-f093-96bf-fe99c03adfc5@gmail.com> <31111796-3CF7-4F8F-A805-4CBE1124E9D8@tzi.org> <e16961f5-edbc-233e-3e24-e3a20bc57ea4@gmail.com> <83052D85-36BE-45AA-81EA-A46068B89D95@tzi.org> <CADEL5zsgq+yxB+dd5vpVpB4A8xs86h+JGz6Mb9aZNPyEmxct_g@mail.gmail.com> <C76EF730-DDD0-4E63-8933-58225C921668@tzi.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <C76EF730-DDD0-4E63-8933-58225C921668@tzi.org>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/5rGzS2OAlI1g0-iQBtAkkiiwflA>
Subject: Re: [Cbor] Status of Appendix A in RFC 8949
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 May 2023 10:57:22 -0000

On 2023-05-05 11:17, Carsten Bormann wrote:
> On 2023-05-05, at 10:16, Anders Rundgren <anders.rundgren.net@gmail.com> wrote:
>>
>> A diagnostic notation parser/decoder would generate 0x23 for -4.0.
> 
> When an application uses a dCBOR library to encode a -4.0, the CBOR generic data model will see a -4, which is shown as -4 in diagnostic notation and as 0x23 in the encoded data item.

For a "normal" developer (I think I am one), it is not very obvious how Appendix A can be normative if a compliant DN *parser* implementation may also encode -4.0 as 0x23, while the Appendix' 0xf90c400 is flagged as an invalid data item by decoders.

> 
> You can write an application that takes CBOR diagnostic notation for -4.0, ingests this to a CBOR generic data model, applies dCBOR rules to that, and then encodes it using CBOR deterministic encoding rules.  The diagnostic notation for the latter will show -4, not -4.0.

For the use-cases I'm thinking of, data models are a part of applications.  Application developers should be able to focus on how data models can be expressed in terms of available core data types (*), where CBOR gives you a pretty decent selection. Serialization issues should be invisible to the extent possible.

Anders

*) like they have to for SQL databases.
> 
> Grüße, Carsten
>