Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about gnmi_get and Unmarsha JSON_IETF #87

Open
thilak07 opened this issue Oct 16, 2019 · 0 comments
Open

Question about gnmi_get and Unmarsha JSON_IETF #87

thilak07 opened this issue Oct 16, 2019 · 0 comments
Labels
clarify Needs further clarification gnmi

Comments

@thilak07
Copy link

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.

err = json.Unmarshal(InterfaceByteVal, ocInterface)

@samribeiro samribeiro added the clarify Needs further clarification label Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarify Needs further clarification gnmi
Projects
None yet
Development

No branches or pull requests

2 participants