Re: [Json] Fwd: Blog: YANG Takes Off in the Industry

Phillip Hallam-Baker <ietf@hallambaker.com> Fri, 01 August 2014 12:11 UTC

Return-Path: <hallam@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A15E51A0659 for <json@ietfa.amsl.com>; Fri, 1 Aug 2014 05:11:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] 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 qhB9OZ1wdoB7 for <json@ietfa.amsl.com>; Fri, 1 Aug 2014 05:11:22 -0700 (PDT)
Received: from mail-lb0-x22b.google.com (mail-lb0-x22b.google.com [IPv6:2a00:1450:4010:c04::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D16B91ABB1D for <json@ietf.org>; Fri, 1 Aug 2014 05:11:21 -0700 (PDT)
Received: by mail-lb0-f171.google.com with SMTP id l4so3106886lbv.16 for <json@ietf.org>; Fri, 01 Aug 2014 05:11:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Qkyb8YqVuN0P9Q3ffsAoZ9dpMA4aSK5NkuO+r19NK/w=; b=j3mF8XFzF6F0oMmVHmNAklGdoYRbs4YREITIJeiNR382U8wMf3wy10TOvbTPv1SaYF lUNoNDdygoOahQp4n9S0a7WmZ8PU+1MJqYX4dx97D6A1cuY6T66LoNcFgOujq+T2VWKR k1Ptqx5hnW7x8zYtybU01AgrCeRwiWwf1xpAOMOnm6lVNBah7UTmH9IZNYOzambCRXXz oiW1oEz9EwrRq2ZJP+ddf3kKKtx2ZI6Xg/5Y/2ef5gZSNRERsKrqtZUgN/AEBVWWimmh tAuO1DDEMAtOUppDM8YmSsf1BL0J3p17cbtssHxAkm68U0rPaYmm3La8BXR4E2P0uh4y +gMA==
MIME-Version: 1.0
X-Received: by 10.152.29.202 with SMTP id m10mr5394756lah.4.1406895079605; Fri, 01 Aug 2014 05:11:19 -0700 (PDT)
Sender: hallam@gmail.com
Received: by 10.112.122.50 with HTTP; Fri, 1 Aug 2014 05:11:19 -0700 (PDT)
In-Reply-To: <20140801115408.GC23649@mercury.ccil.org>
References: <53DB7757.8000600@cisco.com> <39ADA8F1-D204-4B2C-A1AC-0CA1F3B238D1@tzi.org> <20140801115408.GC23649@mercury.ccil.org>
Date: Fri, 01 Aug 2014 08:11:19 -0400
X-Google-Sender-Auth: vHulX2a4_XU2Yc9HQ41g9NSqt8w
Message-ID: <CAMm+LwhFBuUj3=Od1cEAGr8k1=wa4gZZCU-AJJf+PySPG0MupA@mail.gmail.com>
From: Phillip Hallam-Baker <ietf@hallambaker.com>
To: John Cowan <cowan@mercury.ccil.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/json/6BiMnt2BbJtNfnVbZgvLIHlIbeM
Cc: Carsten Bormann <cabo@tzi.org>, JSON WG <json@ietf.org>
Subject: Re: [Json] Fwd: Blog: YANG Takes Off in the Industry
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Aug 2014 12:11:29 -0000

On Fri, Aug 1, 2014 at 7:54 AM, John Cowan <cowan@mercury.ccil.org> wrote:
> Carsten Bormann scripsit:
>
>> For large parts of the IETF, the JSON schema discussion we are not
>> having is already settled.
>
> Say what?  YANG is a data modeling language for network configuration
> expressed in XML and defined in RFC 6020 -- which does not contain the
> word JSON once.

But you could use it to create a data model that was represented in JSON.

At this point it is rather clear that JSON has won the Web Services
data encoding battle. And it is perhaps not surprising. 80% of the
functionality of XML is there for the people using it to model
documents. And that community refuses to make any changes to XML or
XML schema to support protocol work. So XML is a bad choice for
protocol design.

So I think his point is that if you aren't doing JSON its not relevant anyway.


Using a schema to design a protocol is still a good idea. But only if
you have the right tools.

My tools generate the Internet Draft reference materials and the code
that is run to produce the examples from the same schema. So they are
both always in sync. It now generates C code as well so you can use it
in production.


Whether the schema helps of gets in the way depends on what sort of
programmer you are and what your security concerns are. For my code I
want to map the input stream to an in-language data representation and
validate the syntax and type of all the sub-nodes before I pass the
data on to my dispatch routine.