Data parser allows to read instances from a specific format. libyang supports the following data formats:
-
XML
Original data format used in NETCONF protocol. XML mapping is part of the YANG specification (RFC 6020).
-
JSON
The alternative data format available in RESTCONF protocol. Specification of JSON encoding of data modeled by YANG can be found in RFC 7951. The specification does not cover RPCs, actions and Notifications, so the representation of these data trees is proprietary and corresponds to the representation of these trees in XML.
While the parsers themselves process the input data only syntactically, all the parser functions actually incorporate the common validator checking the input data semantically. Therefore, the parser functions accepts two groups of options - Data parser options and