libyang
3.6.0
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
|
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 Data validation options.
In contrast to the schema parser, data parser also accepts empty input data if such an empty data tree is valid according to the schemas in the libyang context (i.e. there are no top level mandatory nodes).
There are individual functions to process different types of the data instances trees:
Further information regarding the processing input instance data can be found on the following pages.