Re: [go-nuts] How to send bytes of data to struct

2022-09-28 Thread Roland Müller
Following tutorial about usage of encoding/json should address your question. https://tutorialedge.net/golang/parsing-json-with-golang/ BR, Roland Am Sonntag, 25. September 2022 schrieb Vishnu B : > I am new to golang, I have a function that receives the JSON data as bytes(data variable) I want

[go-nuts] How to send bytes of data to struct

2022-09-25 Thread Vishnu B
I am new to golang, I have a function that receives the JSON data as bytes(data variable) I want to send that data to a struct(Item Struct), When I use the data or string(data) it doesn't accept it. if it uses JSON ( {Type:"NETFLOW_V5",ObservationPointID:0,ObservationDomainID:0,TimeReceived:16640