We currently expect the inference to correctly point to the schema tree parent of the node that is being parsed.
This unfortunately is not entirely correct, as RESTCONF demonstrates: after parsing the data tree path (from URL), it also has to peek at the document to determine the additional YangInstanceIdentifier steps required for the document root to be reached and adjust the inference it passes to XmlParserStream. JSON codec does something different – it seems to be able to recover and we adjust the path after the parser result. See JsonNormalizedNodeBodyReader and XmlNormalizedNodeBodyReader for details.
What we really want to achieve is a single-pass parsing environment, where RESTCONF will give us the data tree identifier (e.g. YangInstanceIdentifier) and we figure out the missing steps as part of initialization – and communicate those back to it.
- blocks
-
NETCONF-911 JSON reader: Eliminate additional logic for augmented data
- Confirmed