Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyang convert yang files to json #921

Open
mhhamze opened this issue Dec 28, 2024 · 1 comment
Open

pyang convert yang files to json #921

mhhamze opened this issue Dec 28, 2024 · 1 comment

Comments

@mhhamze
Copy link

mhhamze commented Dec 28, 2024

I want to convert the YANG files I received from a switch to JSON. Is it possible to use pyang for this purpose or not? And if the answer is no, what alternative solutions are there for this problem?

@szabolcsszekely
Copy link

You can convert the YANG files into XML with the 'pyang -f yin file.yang' command and then convert the XML into JSON with your favorite XML to JSON converter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants