Re: A standard for XML - JSON mapping.

Carsten Bormann <cabo@tzi.org> Tue, 02 February 2016 16:56 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6165A1B2D53 for <ietf@ietfa.amsl.com>; Tue, 2 Feb 2016 08:56:04 -0800 (PST)
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
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 WNuAjCxCtSwc for <ietf@ietfa.amsl.com>; Tue, 2 Feb 2016 08:55:59 -0800 (PST)
Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:c:538::195]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3688B1B2B7E for <ietf@ietf.org>; Tue, 2 Feb 2016 08:55:59 -0800 (PST)
Received: from mfilter46-d.gandi.net (mfilter46-d.gandi.net [217.70.178.177]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 952DDA810C; Tue, 2 Feb 2016 17:55:57 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mfilter46-d.gandi.net
Received: from relay3-d.mail.gandi.net ([IPv6:::ffff:217.70.183.195]) by mfilter46-d.gandi.net (mfilter46-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id EbSMLV6_9vmF; Tue, 2 Feb 2016 17:55:56 +0100 (CET)
X-Originating-IP: 93.199.254.229
Received: from nar.local (p5DC7FEE5.dip0.t-ipconnect.de [93.199.254.229]) (Authenticated sender: cabo@cabo.im) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id D5D81A80AA; Tue, 2 Feb 2016 17:55:55 +0100 (CET)
Message-ID: <56B0DF99.2040903@tzi.org>
Date: Tue, 02 Feb 2016 17:55:53 +0100
From: Carsten Bormann <cabo@tzi.org>
User-Agent: Postbox 4.0.8 (Macintosh/20151105)
MIME-Version: 1.0
To: ietf@ietf.org
Subject: Re: A standard for XML - JSON mapping.
References: <CAB=rKNHnJt-zExrfEjSidd1QumP+vuqHwF2S7MCWUgXmJN19hQ@mail.gmail.com> <56AF030F.3090806@gmx.de> <56AF2DC2.20005@tzi.org> <56AF3B9A.1050502@gmx.de> <002901d15dd8$39438360$4001a8c0@gateway.2wire.net>
In-Reply-To: <002901d15dd8$39438360$4001a8c0@gateway.2wire.net>
X-Enigmail-Version: 1.2.3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/ietf/TBwyQkB6HIGkFMifrBPcvD3Ptbs>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Feb 2016 16:56:04 -0000

> I wonder if you are familiar with restconf, which is NETCONF over HTTP
> with the YANG data in either XML (which is what NETCONF uses for its RPC
> and data therein) or in JSON.  

Certainly (RESTCONF is the basis of COMI in the CoRE WG).

The YANG-JSON mapping is solving a different problem than the one that
was discussed here: It is representing data that conforms to a YANG
Model in JSON (where that data previously has been represented in XML).
 So it does not have to cope with all the strangeness of XML, but only
with those parts of XML used by YANG.

Some complexities in YANG-JSON come from the fact that YANG has been
designed in a way that is a bit too XML-friendly, and that YANG-JSON
tries to be I-JSON (RFC 7493), so it can only use a subset of JSON.

(The core of COMI is a YANG-CBOR mapping, which will inherit some of the
former, but we hope none of the latter class of problems.)

Grüße, Carsten