ygot icon indicating copy to clipboard operation
ygot copied to clipboard

Unmarshal internal JSON.

Open ostromart opened this issue 6 years ago • 3 comments

Currently only IETF JSON is supported.

ostromart avatar Oct 12 '17 17:10 ostromart

@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!

robshakir avatar Oct 24 '17 18:10 robshakir

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.

nickethier avatar Oct 25 '17 20:10 nickethier

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

ostromart avatar Oct 26 '17 18:10 ostromart