Re: [Cbor] Status of Appendix A in RFC 8949
Carsten Bormann <cabo@tzi.org> Fri, 05 May 2023 12:11 UTC
Return-Path: <cabo@tzi.org>
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 1A623C151985 for <cbor@ietfa.amsl.com>; Fri, 5 May 2023 05:11:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.887
X-Spam-Level:
X-Spam-Status: No, score=-1.887 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01] autolearn=ham autolearn_force=no
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 4ow8uRkuG1NG for <cbor@ietfa.amsl.com>; Fri, 5 May 2023 05:11:18 -0700 (PDT)
Received: from smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [134.102.50.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 E7898C1526ED for <cbor@ietf.org>; Fri, 5 May 2023 05:11:16 -0700 (PDT)
Received: from [192.168.217.124] (p548dc0f6.dip0.t-ipconnect.de [84.141.192.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4QCV021dsHzDCg3; Fri, 5 May 2023 14:11:14 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <37b5a9ab-e28c-c4e7-3c60-6faa4049de28@gmail.com>
Date: Fri, 05 May 2023 14:11:13 +0200
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 704981473.591415-7a87d65dbeaf864279e2909b6a890aad
Content-Transfer-Encoding: quoted-printable
Message-Id: <DF36C377-2AA9-40B3-97D1-7114ED807AFC@tzi.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> <37b5a9ab-e28c-c4e7-3c60-6faa4049de28@gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/qJKnyzp9h3VZLcNaLkMej2cGVMY>
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 12:11:23 -0000
>> 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. If a “normal” developer for you is somebody who doesn’t try to understand the terminology, then it’s hard to help. It may be somewhat surprising use of terminology, but CBOR diagnostic notation is intended as a *diagnostic notation*. It represents fairly exactly what is/will be in the CBOR encoded data item. So you can write things like {“z”: 1, “a”: 2}, which aren’t going to be deterministic encoding. And if your application has rules like “no floating point representation of integral numbers”, you can write something that violates that, too. Of course, you can combine a CBOR diagnostic notation processor (parser + something that operates on the resulting parse tree) that reprocesses the parse tree based on some application rules, which appears what you want to do. It is just very confusing to call this a “CBOR diagnostic notation parser”, because it not only parses, but also processes based on some application rules. You may want to condense these application rules into a “profile” to be able to share such a processor between applications, and that is what I think dCBOR is about. >> 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. Of course you can do an application library that does just that. You just need to keep in mind that this incorporates some CBOR processing plus some translation from an application data model to how your profiles likes to represent that in the CBOR generic data model. Grüße, Carsten
- [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Carsten Bormann
- Re: [Cbor] Status of Appendix A in RFC 8949 Carsten Bormann
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Carsten Bormann
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Carsten Bormann
- Re: [Cbor] Status of Appendix A in RFC 8949 Laurence Lundblade
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Brian E Carpenter
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren
- Re: [Cbor] Status of Appendix A in RFC 8949 Laurence Lundblade
- Re: [Cbor] Status of Appendix A in RFC 8949 Anders Rundgren