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

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Tue, 24 May 2016 12:36 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
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 BF13C12D117 for <core@ietfa.amsl.com>; Tue, 24 May 2016 05:36:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.626
X-Spam-Level:
X-Spam-Status: No, score=-5.626 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-1.426] 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 l94agCjua2e5 for <core@ietfa.amsl.com>; Tue, 24 May 2016 05:36:19 -0700 (PDT)
Received: from atlas3.jacobs-university.de (atlas3.jacobs-university.de [212.201.44.18]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 154A512D68F for <core@ietf.org>; Tue, 24 May 2016 05:36:19 -0700 (PDT)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id D7CC7AC2; Tue, 24 May 2016 14:36:17 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas3.jacobs-university.de ([10.70.0.220]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10030) with ESMTP id vEv86hLWKttZ; Tue, 24 May 2016 14:36:10 +0200 (CEST)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas3.jacobs-university.de (Postfix) with ESMTPS; Tue, 24 May 2016 14:36:17 +0200 (CEST)
Received: from localhost (demetrius2.jacobs-university.de [212.201.44.47]) by hermes.jacobs-university.de (Postfix) with ESMTP id 244802005C; Tue, 24 May 2016 14:36:17 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius2.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id LVSSi1zSkoL6; Tue, 24 May 2016 14:36:16 +0200 (CEST)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 8FB1020051; Tue, 24 May 2016 14:36:15 +0200 (CEST)
Received: by elstar.local (Postfix, from userid 501) id 9A81E3AF0715; Tue, 24 May 2016 14:36:14 +0200 (CEST)
Date: Tue, 24 May 2016 14:36:13 +0200
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Ladislav Lhotka <lhotka@nic.cz>
Message-ID: <20160524123613.GB9897@elstar.local>
Mail-Followup-To: Ladislav Lhotka <lhotka@nic.cz>, Carsten Bormann <cabo@tzi.org>, Core <core@ietf.org>
References: <CABCOCHRRACvVXx2S_hZm2TxbvP48aO4Q4REkh0LFjmHkMkZ1Vg@mail.gmail.com> <m2y473svm0.fsf@nic.cz> <57401CC2.2040002@tzi.org> <20160521112857.GA4437@elstar.local> <m2zirh81d8.fsf@birdie.labs.nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <m2zirh81d8.fsf@birdie.labs.nic.cz>
User-Agent: Mutt/1.6.0 (2016-04-01)
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/6wZQE124SZeGL9e3CHY0aeSjyM4>
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
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
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: Tue, 24 May 2016 12:36:26 -0000

On Mon, May 23, 2016 at 01:22:59PM +0200, Ladislav Lhotka wrote:

> > YANG's native serialization of values are untyped strings.
> 
> To my knowledge, this hasn't been stated as a design feature for YANG,
> it's just a side effect of XML being the only serialization that was
> considered when YANG was being designed.

We use string representations of values in other contexts, e.g., when
writing pattern restrictions or when evaluating xpath expressions. We
also do define canonical string formats for our types.

Note, this does not mean an implementation has store internally all
values as strings but when it matters, the string representation of
values defines the behavior. Except for unions in JSON...

My take has been that non-XML encodings may take advantage of being
able to present data mode 'efficiently' (CBOR) or to make it easier
for applications / libraries (JSON). For me, encodings that change how
we interpret types at the YANG level are somewhat surprising.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>