Standards are essential to the success of networking, and unless there is major improvement by deviating from the standard, it is best practice to follow standards.
we are developing a open-source router project and the intial though was to go for YANG. However I see some complexitiy in the YANG data-strucutr, which is not necesseraly needed in JSON.
Have there been thoughts to use a JSON-optimized-data-strucutere instead of the XML-optimized-YANG data-strucutres. I think Netconf and Yang and bound closely together, If we move to an REST api, which offers JSON support, also a more efficient data-structure could be applied:
In the examples below:
JSON optimized code has 10 lines and 6 levels of hierarchy.
the YANG compliant equivalent has 18 lines and 9 levels of hierarchy.
That is an imporvemnt of 30-40%, also the JSON model is much easier to read.
e.g. this JSON data-strucutre (in YAML represenation)
Standards are essential to the success of networking, and unless there is major improvement by deviating from the standard, it is best practice to follow standards.
we are developing a open-source router project and the intial though was to go for YANG. However I see some complexitiy in the YANG data-strucutr, which is not necesseraly needed in JSON.
Have there been thoughts to use a JSON-optimized-data-strucutere instead of the XML-optimized-YANG data-strucutres. I think Netconf and Yang and bound closely together, If we move to an REST api, which offers JSON support, also a more efficient data-structure could be applied:
In the examples below: JSON optimized code has 10 lines and 6 levels of hierarchy. the YANG compliant equivalent has 18 lines and 9 levels of hierarchy. That is an imporvemnt of 30-40%, also the JSON model is much easier to read.
e.g. this JSON data-strucutre (in YAML represenation)
has the same information content as the YANG-OpenConfig compliant datastructure (also in YAML format):
Basically the JSON model would not use YANG lists, but just containers, leaf and leaf-Lists.
feedback appreciated
best regards Stefan