3 ms·
> parsing json in Java or Go without just treating everything as a bag of Object or an interface{} requires a ton of menial boilerplate work. From my experienc
by tveita 9y ago
> parsing json in Java or Go without just treating everything as a bag of Object or an interface{} requires a ton of menial boilerplate work.
From my experience in Java it is pretty simple using a library like Jackson. You define the types you expect to read, maybe add some annotations, and then it's one function call to deserialize. IIRC Go has something similar in its json library.
- cdelsolar 9y agoYes, it's arguably nicer in Go, because you specify exactly what types and field names you expect, and then it's just a simple json.Unmarshal