ygot
ygot copied to clipboard
Unmarshal internal JSON.
Currently only IETF JSON is supported.
@nickethier -- this was one that we discussed. Did you still fancy looking at implementing this? @ostromart is happy to help out with it if you'd like to!
Yeah I'd love to help out here. I started to take a stab at this a couple weeks ago, but after seeing how the generated Unmarshal
method works I'm not sure its the right the direction. It walks the json structure and uses the path field tags to navigate the GoStruct
. Its pretty rough as it was just a stab at trying to understand how things worked, but I'll leave it here for reference: 103accaf
If you want to point me towards the right direction, I'd be happy to give it another go.
Hi Nick, The work involved in implementing this should not be very much, but the trick is to understand how to integrate it into the exiting code. Unfortunately the complexity of the underlying YANG data structures is further complicated through the use of reflect, so it's pretty hard to get a grip on what's going on. If you're still game to give it a go, I suggest having a call to do a code walkthrough as a starting point. I can also point you to the specific places where changes need to be made to save you some pain. Thanks, Martin