Re: [core] Comments on draft-ietf-core-yang-cbor-00
Ladislav Lhotka <lhotka@nic.cz> Tue, 24 May 2016 14:25 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 34A2D12D0B2 for <core@ietfa.amsl.com>; Tue, 24 May 2016 07:25:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.426
X-Spam-Level:
X-Spam-Status: No, score=-8.426 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-1.426] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 VjQ1emFfAg2x for <core@ietfa.amsl.com>; Tue, 24 May 2016 07:25:10 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CA56512D805 for <core@ietf.org>; Tue, 24 May 2016 07:25:09 -0700 (PDT)
Received: from [IPv6:2001:718:1a02:1:19a:9961:8dbe:3869] (unknown [IPv6:2001:718:1a02:1:19a:9961:8dbe:3869]) by mail.nic.cz (Postfix) with ESMTPSA id 782206169A; Tue, 24 May 2016 16:25:08 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1464099908; bh=h8kPVm1b+aFw3qGw36Edr/rFcgh3+NSXj0tjz8sRw2Q=; h=From:Date:To; b=Pvlbw2Hji72BD0RkuW8+BUIoJBxKMlI7XIVAiwtDBrXDngWPqFM7bDTQRJssj4Vfa hCMtKd5gTikKnUsTX3nWvJwz8msXk4l4hKs2lx8z1o9+9X0TxeJjZMZWi3bP0G+Y89 te84bmwDoSoe4NcCCF20CBaSRBu025ELIsaUsxQI=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <20160524123613.GB9897@elstar.local>
Date: Tue, 24 May 2016 16:25:13 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <AF6317CD-C9A7-4D7A-A80C-B2DBE0A210A9@nic.cz>
References: <CABCOCHRRACvVXx2S_hZm2TxbvP48aO4Q4REkh0LFjmHkMkZ1Vg@mail.gmail.com> <m2y473svm0.fsf@nic.cz> <57401CC2.2040002@tzi.org> <20160521112857.GA4437@elstar.local> <m2zirh81d8.fsf@birdie.labs.nic.cz> <20160524123613.GB9897@elstar.local>
To: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3124)
X-Virus-Scanned: clamav-milter 0.98.7 at mail
X-Virus-Status: Clean
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/cSaHjJsKIh1pDmkqpe195eOBams>
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: Tue, 24 May 2016 14:25:13 -0000
> On 24 May 2016, at 14:36, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote: > > 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 Actually, pattern restrictions are only possible for the "string" type. And XPath is not limited to strings, we can write, e.g., must ". mod 2 = 0"; > 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. The problem is that XML, JSON and CBOR are not just different encodings (as in Unicode) but rather different ways for representing structured data, and each has different priorities and semantics. I don't think that "gleichgeschaltetes" JSON or CBOR, where everything is a string, is an attractive option. Lada > > /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/> -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C
- [core] Comments on draft-ietf-core-yang-cbor-00 Andy Bierman
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Michel Veillette
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Andy Bierman
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Carsten Bormann
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Andy Bierman
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Michel Veillette
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Ladislav Lhotka
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Carsten Bormann
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Carsten Bormann
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Juergen Schoenwaelder
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Carsten Bormann
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Juergen Schoenwaelder
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Andy Bierman
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Ladislav Lhotka
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Carsten Bormann
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Ladislav Lhotka
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Ladislav Lhotka
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Ladislav Lhotka
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Juergen Schoenwaelder
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Juergen Schoenwaelder
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Ladislav Lhotka
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Juergen Schoenwaelder
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Ladislav Lhotka
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Carsten Bormann
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Juergen Schoenwaelder
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Michel Veillette
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Carsten Bormann
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Carsten Bormann
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Michel Veillette
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Carsten Bormann
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Ladislav Lhotka
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Carsten Bormann
- Re: [core] Comments on draft-ietf-core-yang-cbor-… Ladislav Lhotka