It DOES parse with then encoding/json package: https://play.golang.org/p/IQzMm2tDI7w
The protoc-generated code's Unmarshal parses a *Protocol Buffers* encoded byte stream, NOT JSON! 2018. május 14., hétfő 5:24:06 UTC+2 időpontban Luke IC a következőt írta: > > 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.