Subject: Re: [Netconf] zerotouch/19: How to encode YANG-modeled artifacts?

From: Kent Watsen <[email-masked]>
Date: Tue, 14 Mar 2017 14:01:53 +0000

> I think it carries the idea. But then the wording is somewhat vague or
> soft (a convention SHOULD be used followed by 'e.g.' with an example
> leaves some room for interpretation) - can I come up with my own
> convention for XML and JSON encoded content as I see fit?

As a follow-up to this, the current draft is using rc:yang-data to define
the data model for the artifact (data-structure).  The draft then states
that JSON-encoded is wrapped by a DER-encoded PKCS#7 structure.  This 
PKCS#7 structure may be, for instance, placed onto a USB drive or returned
by the zerotouch bootstrap (RESTCONF) server.  The RESTCONF server itself
can return either JSON or XML response, but the PKCS# binary data will 
always be base64-encoded and, of course, contain JSON inside.

The choice of JSON over XML was made to match the ANIMA voucher document,
where they very much wanted JSON.

Kent