Re: [core] Comments on draft-ietf-core-yang-cbor-00

Ladislav Lhotka <lhotka@nic.cz> Mon, 23 May 2016 11:27 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3556E12D6A6 for <core@ietfa.amsl.com>; Mon, 23 May 2016 04:27:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
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 W0okCOhkVyYK for <core@ietfa.amsl.com>; Mon, 23 May 2016 04:27:18 -0700 (PDT)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 3FF6A12D687 for <core@ietf.org>; Mon, 23 May 2016 04:27:18 -0700 (PDT)
Received: from localhost (unknown [195.113.220.110]) by trail.lhotka.name (Postfix) with ESMTPSA id 08CC31CC02AA; Mon, 23 May 2016 13:27:19 +0200 (CEST)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <57401E02.6000409@tzi.org>
References: <CABCOCHRRACvVXx2S_hZm2TxbvP48aO4Q4REkh0LFjmHkMkZ1Vg@mail.gmail.com> <m2y473svm0.fsf@nic.cz> <57401E02.6000409@tzi.org>
User-Agent: Notmuch/0.22 (http://notmuchmail.org) Emacs/24.4.51.2 (x86_64-apple-darwin14.0.0)
Date: Mon, 23 May 2016 13:27:19 +0200
Message-ID: <m2wpml8160.fsf@birdie.labs.nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/OP_ytqO4DKLZ6P59Ee-qibpMKWk>
Cc: Core <core@ietf.org>
Subject: Re: [core] Comments on draft-ietf-core-yang-cbor-00
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 23 May 2016 11:27:20 -0000

Carsten Bormann <cabo@tzi.org> writes:

> Ladislav Lhotka wrote:
>> The receiving side will resolve the union type by the first union member
>> type that matches the CBOR-encoded value. It's the same as in JSON encoding.
>
> Oh, and I also have a problem with requiring YANG-CBOR decoders to do
> this kind of "matching", which is:
>
> -- complex (you need a full constraint evaluator)
> -- not necessarily well-defined (prove that it is!)
> -- not necessarily even possible at the time of decoding (!)

Right, tagging the values is a better option.

>
> The example in Section 9.12.4 of draft-ietf-netmod-rfc6020bis-12.txt of
> a union data item retroactively (i.e., after decoding!?) turning into a
> string when the leaf that it was originally referencing was deleted is
> hilarious.

Agreed.

Lada

>
> Grüße, Carsten

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C