YANG's anydata is defined to be an YANG-modeled data formatted in transport encoding. We are using DOMSource to represent this data.
This is less than optimal, simply because DOMSource leaks Document/Element, both of which are mutable.
in both JSON and XML codecs, when we are dealing with a forward reference, we store encountered events into a String and re-parse them.
Both of these would do better if we had an object model for anydata contents. Once we have that, we can act it for buffering purposes.
Once we do, there is little doubt where AnydataNode is going: it is going to be unconditionally based on this internal object model.
Steps to completion:
1. Introduce a bare-minimum model of what constituates YANG-modeled XML data,
2. Define an anydata/anyxml representation nodes.
3. add binfmt support
4. add DOMSource -> XYZDocument translation
- blocks
-
YANGTOOLS-994 Add support for JSON-encoded anydata
- Confirmed