Go's JSON marshaling can be heavy if you tie it to a strict struct versus, say, an interface. You can make it light, but yes, sometimes some reflection is necessary to utilize that data.
For most web applications, JSON in or out is of a known schema, so this generally impacts other servers moreso than web applications.
Re:Building Web Apps in Go
by TheSwordsman on Sunday March 27, 2016 @10:55PM
(#11372468)
Oh absolutely.
I guess I was trying to call out that, depending on the API you are supporting, it can get hairy. If you are designing it from scratch, when starting the Go project, you can structure your JSON in a way that's easy to work with.
If you're coming in to something that was easy to use in a language like Python, it may not be that easy in Go.
I guess my point is it will be more concise than Java, certainly closer to Python.
Re:Building Web Apps in Go
by stephenboyd on Sunday March 27, 2016 @11:05PM
(#11372503)
And if you have to marshal/unmarshal XML, it gets worse. Go's XML library is buggy and its documentation recommends using JSON instead.
If you start having to Marshal/Unmarshal JSON, it'll get pretty annoying pretty quick depending on the JSON format.