Re: [core] YANG to CBOR mapping
Ladislav Lhotka <lhotka@nic.cz> Fri, 20 November 2015 12:22 UTC
Return-Path: <lhotka@nic.cz>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 733061B2F50 for <core@ietfa.amsl.com>; Fri, 20 Nov 2015 04:22:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.936
X-Spam-Level:
X-Spam-Status: No, score=-0.936 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HELO_EQ_CZ=0.445, HOST_EQ_CZ=0.904, MIME_8BIT_HEADER=0.3, RP_MATCHES_RCVD=-0.585] autolearn=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 dKG_Rt5f3QbA for <core@ietfa.amsl.com>; Fri, 20 Nov 2015 04:22:37 -0800 (PST)
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 828751B2F3C for <core@ietf.org>; Fri, 20 Nov 2015 04:22:37 -0800 (PST)
Received: from [IPv6:2a01:5e0:29:ffff:45ad:c3e9:4731:d337] (unknown [IPv6:2a01:5e0:29:ffff:45ad:c3e9:4731:d337]) by mail.nic.cz (Postfix) with ESMTPSA id 04A15181B2A; Fri, 20 Nov 2015 13:22:35 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1448022156; bh=l4i1T7das1B0zgmCMUsbJ8PT0h11OZwj69M/i4EjUoA=; h=From:Date:To; b=UphTw5++dVgKVuXVHUBYbi2R23JOauxiWw8l576hdtPqrQASmj9yp8uKC1xuAf+w9 WKOiXsIYV6yi2mdIrHdGZmPmkk9r3NEcEhTqxFVC4SmAhcIQ+6aEPu4di1CIYZBGr0 1eoPoNqi2yFZtNJ6OniREBRRw8gaSUzQnMdmNvRw=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <20151119152734.GA3518@elstar.local>
Date: Fri, 20 Nov 2015 13:22:35 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <4595D109-2EBC-4176-A65E-D4B075DD6CF0@nic.cz>
References: <02d2efc9e66b090dd7b7932ae4e749cd@xs4all.nl> <BLUPR06MB1763C6BBEEE42279A79A8F30FE1B0@BLUPR06MB1763.namprd06.prod.outlook.com> <564DE2C1.50205@tzi.org> <20151119152734.GA3518@elstar.local>
To: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3096.5)
X-Virus-Scanned: clamav-milter 0.98.7 at mail
X-Virus-Status: Clean
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/QlX-XG0SykX5DdrSOqtjxSXfli0>
Cc: Core <core@ietf.org>
Subject: Re: [core] YANG to CBOR mapping
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.15
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: Fri, 20 Nov 2015 12:22:39 -0000
> On 19 Nov 2015, at 16:27, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote: > > On Thu, Nov 19, 2015 at 03:54:57PM +0100, Carsten Bormann wrote: >> >> So I think that Peter's reminder to stay close to >> draft-ietf-netmod-yang-json -- unless we do need to deviate -- is quite >> germane. >> > > I do not understand what "stay close to draft-ietf-netmod-yang-json" > means. I think this requires an explanation. > > To give you an example: draft-ietf-netmod-yang-json is following > I-JSON rules and one of them says that I-JSON numbers are limited in > precision. As a consequence, 64-bit numbers are I-JSON encoded as > strings for I-JSON compliance. I think CBOR does not require this > since it does not have this particular restriction. So do we now > continue to do this even though CBOR does not suffer from I-JSON > limitations? > > I think my preference would be a clean mapping YANG to CBOR and not a > mapping YANG to I-JSON to CBOR that carries I-JSON restrictions over > to CBOR. The simple reason is that the longer the transformation > chain, the more arcane rules you accumulate. I agree, it isn't probably necessary to couple the CBOR mapping with JSON as defined in the yang-json draft. Some of the I-JSON restrictions are an ugly compromise, really, and you'd better avoid them. I believe a mapping between CBOR, JSON and XML encodings will be possible anyway. Lada > > But then the CBOR spec has already JSON to CBOR translation rules so > YANG to I-JSON to CBOR is already defined somehow. Someone needs to > compile a list of cases where YANG to CBOR would be different from > YANG to JSON to CBOR before we can take an informed decision. > > /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] YANG to CBOR mapping peter van der Stok
- Re: [core] YANG to CBOR mapping Somaraju Abhinav
- Re: [core] YANG to CBOR mapping Juergen Schoenwaelder
- Re: [core] YANG to CBOR mapping Juergen Schoenwaelder
- Re: [core] YANG to CBOR mapping Michel Veillette
- Re: [core] YANG to CBOR mapping Carsten Bormann
- Re: [core] YANG to CBOR mapping Juergen Schoenwaelder
- Re: [core] YANG to CBOR mapping Michel Veillette
- Re: [core] YANG to CBOR mapping Ladislav Lhotka
- Re: [core] YANG to CBOR mapping Ladislav Lhotka
- Re: [core] YANG to CBOR mapping Carsten Bormann
- [core] YANG to CBOR mapping peter van der Stok
- Re: [core] YANG to CBOR mapping Carsten Bormann
- Re: [core] YANG to CBOR mapping peter van der Stok
- Re: [core] YANG to CBOR mapping Michel Veillette
- Re: [core] YANG to CBOR mapping peter van der Stok
- Re: [core] YANG to CBOR mapping Michel Veillette