On Tue, Sep 15, 2015 at 09:31:58AM +0200, Ladislav Lhotka wrote:
> Juergen Schoenwaelder <[email protected]> writes:
> 
> > On Thu, Sep 10, 2015 at 10:46:10AM +0200, Ladislav Lhotka wrote:
> >> Hi,
> >> 
> >> this revision introduces no changes to the encoding rules. The text was 
> >> modified, and hopefully improved, in quite a few places, mainly due to 
> >> Juergen’s review of -04, thanks Juergen.
> >>
> >
> > Lada, a suggestion and a question concerning anydata. The text
> > currently says:
> >
> >    Anydata data node is a new feature in YANG 1.1.  It serves as a
> >    container for an unknown set of nodes that however appear as normal
> >    YANG-modeled data.  A data model for anydata content may or may not
> >    exist at run time.  In the latter case, no universal mapping between
> >    JSON- and XML-encoded instances is available.
> >
> > The suggestion is to rewrite the text to be more inline with the YANG
> > 1.1 definition of anydata (and I do not think it matters to highlight
> > that anydata is a YANG 1.1 thing, the document also mentions actions
> > without saying this is a YANG 1.1 feature).
> >
> >    An anydata data node can contain an unknown set of nodes that
> >    can be modelled by YANG. A data model for anydata content may or may not
> >    exist at run time.  In the latter case, no universal mapping between
> >    JSON- and XML-encoded instances is available.
> >
> > My question is why the text is silent about the case where the data
> > model is present. Should it not say that if the data model is present,
> > the data encoded inside the anydata node must follow the rules of this
> > document? Perhaps this is the implicit assumption but I think it will
> > be useful to say this explicitly (if we agree on this).
> 
> If we do agree on this, then IMO 6020bis is the right place to state it
> because this rule should hold for any encoding. 

Perhaps 6020bis should state this but for the sake of completeness I
think it is desirable that encoding specifications are clear about
this as well.

> > If the data model is not present, then I think an implementation is
> > still expected to produce an encoding that follows the rules of this
> > document as much as possible except that things that requires data
> 
> I tried to specify these rules in the four bullets in sec. 5.5. Do you
> think something else is needed?

I think the text in 5.5 allows more than the rest of the YANG encoding
in JSON specification. I think content should carry modules names etc.
and not just be I-JSON with some additional rules. For example, the
bullets do not require me to encode module names. I think this is not
good.

/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/>

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to