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 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 model knowledge may be encoded differently (e.g., numbers appearing as strings or namespace names being different). I am thinking along the lines of this proposed new text: 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. If the data model for anydata content is available, then the anydata content MUST be encoded according to the rules of this specification. If the data model for anydata content is not available, the encoding MUST follow the rules of this specification except for rules that require data model knowledge (and as a consequence, numbers may appear as strings or namespace qualifiers may not match module names). /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
