libyang
3.4.2
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
|
libyang provides a mechanism to generalize work with the outputs (and inputs) of the different types. The ly_out handler can be created providing necessary information connected with the specific output type and then used throughout the printers functions. The API allows to combine output from libyang (data or schema) printers and output directly provided by the caller (via ly_print() or ly_write()).
Using a generic output handler avoids need to have a set of functions for each printer functionality and results in simpler API.
The API allows to alter the target of the data behind the handler by another target (of the same type). Also resetting a seekable output is possible with ly_out_reset() to re-write the output.