How to Convert Yang Data Model to Json Data?

How do I convert "YANG" data model to "JSON"? As there is many many docs available in web, in that they changed in YANG synatx to JSON but how the value for the leaf or leaf list they are getting? from where and how it will get actual data in JSON from YANG?

2 Answers

  1. Convert yang to xml using pyang -f yin filename
  2. Convert xml file to json using any of the solutions below
1

Yang is a modeling language, not a data generation language.

What you are asking for is a simulator that will contain the same or pseudo logic as your application to generate data.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest