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
What is the format of the JSON input that you have? There are two sets of functions that might be of interest in ygot for this:
ygot.StringToStructuredPath -- this will take an input path string (per this spec) and convert it to a gnmi.Path protobuf message.
<generated package>.Unmarshal combined with ygot.TogNMINotifications -- this will allow you to unmarshal an RFC7951-compliant JSON output into a ygot-generated Go struct, the TogNMINotifications will then marshal its contents as a set of gnmi.Notification messages containing both the path and value.
Hi,
I want to generate proto inputs in this format from a json equivalent. Is there a way to do so?
path: <
elem: <
name: "a"
elem: <
name: "b"
elem: <
name: "c"
elem: <
name: "d"
Or is there some proto structure / library I can use to dynamically populate proto structures like the above?
The text was updated successfully, but these errors were encountered: