3

At present when I am processing my Yang module it generates xml schema and works using xml. I want to switch to JSON so need suggestion how could I generate JSON schema from Yang module.

I have already tried Pyang tool https://github.com/mbj4668/pyang

  • is this what you are looking for? https://stackoverflow.com/questions/30503356/how-to-convert-yang-data-model-to-json-data – Jonas glass Jul 16 '19 at 11:19
  • 1
    No. I want to generate JSON schema for my Yang module and then use JSON data directly, without using xml –  Jul 16 '19 at 12:00

1 Answers1

0

There is a pyang plugin to do just that.

https://github.com/cmoberg/pyang-json-schema-plugin

It is a little dated, and there are bunch of forks so one of them might work better.

hshib
  • 1,691
  • 1
  • 17
  • 22