Hi, at the NETMOD session Martin proposed that JSON encoding of anyxml instances be changed so that it is required to contain a JSON string with well-formed XML serialization inside. His argument was that "xml" is part on the data node name and also that RFC 6020 says it is "an unknown chunk of XML". I think, however, that the name and definition were influenced by the fact that XML was the only encoding under consideration when 6020 was being written. IMO, the definition could thus be interpreted as "an unknown chunk of data that follows the syntax of the current encoding".
Note that similar ambiguity of interpretations applies to 6020 statements about NETCONF, edit-config etc. - we saw it in the discussion about auto-delete behaviour. A practical problem of Martin's proposal is that it doesn't provide a symmetric option to send arbitrary JSON chunks in JSON encoding (that may or may not be modelled with YANG). An option would be to introduce a new data node "anyjson" but I think this is really a bad approach - shall we then also add "anycbor" etc.? IMO YANG statements and rules should be encoding-independent. I still think the best option would be to introduce "anydata" with my definition above so that in XML encoding it would be equivalent to "anyxml", and deprecate "anyxml". We can also introduce a substatement that could state that the instances of a particular anydata node are required to be modellable in YANG. BTW, it seems that yang-patch needs to be able to transfer anyxml instances, so is it really possible to exclude anyxml from anydata content? Lada -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
