You need to use the go protobuf json decoder https://github.com/golang/protobuf/tree/master/jsonpb
On Monday, 14 May 2018 11:24:06 UTC+8, Luke IC wrote: > > Hi all, > > I'm creating a microservice in Go, using protocol buffers and gRPC. It > interacts with a third-party API (Snooth) and I'm trying to unmarshal the > JSON response into a protobuf struct I've created, using the proto > package. > > Unmarshalling returns an unexpected EOF error. > > > I've summed up the details in full on this question at Stack Overflow: > https://stackoverflow.com/questions/50314476/why-does-unmarshalling-this-api-response-return-an-unexpected-eof > > > In addition to the information posted there, I've also tried using > strconv.Unquote before unmarshalling in line with the idea that the escaped > characters in the API response are causing a double-encode. But this didn't > work either. > > Any help would be greatly appreciated as I've been stuck on this for a > while now and feel there's something simple I'm missing. > > > Thanks. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.