You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By clicking “Sign up for GitHub&rdq
8000
uo;, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
I am using GetJsonIetfVal()on pb.Update inside a GetRespose.Notification and, I am able to the JSON payload coming back from the node.
Is there a method to Unmarshell and assign this payload to YANG go struct (ygot generated bindings)? I am not able to see the go struct getting populated with the JSON data.
For example,
gNMI Get for xPath "openconfig-interfaces:interfaces/"
for _, pbNotification := range GetRespose.Notification {
for _, update := range pbNotification.GetUpdate() {
InterfaceByteVal := val.GetJsonIetfVal() <<<<<<<<<<<<<
ocInterface := &yangmodels.Interface{} // /openconfig-interfaces/interfaces/interface YANG schema element.
I am using GetJsonIetfVal()on pb.Update inside a GetRespose.Notification and, I am able to the JSON payload coming back from the node.
Is there a method to Unmarshell and assign this payload to YANG go struct (ygot generated bindings)? I am not able to see the go struct getting populated with the JSON data.
For example,
gNMI Get for xPath "openconfig-interfaces:interfaces/"
ocInterface := &yangmodels.Interface{} // /openconfig-interfaces/interfaces/interface YANG schema element.
err = json.Unmarshal(InterfaceByteVal, ocInterface)
The text was updated successfully, but these errors were encountered: