Hacker News new | ask | show | jobs
by tgv 1148 days ago
Then don't use json.Decoder, or use pointers in your structs.
1 comments

Or better solution, don't use Go.
Sure, do everything in JS. So much easier.
Ah yes, Go and JavaScript, the only two programming languages.
No, but there are no other languages applicable in this context, really. You need a (de)serializer in each and every one of them, so you have to find some library, and that also includes Go. The easy choice in Go is the default one (simply called json), but there are quite a few alternative (de)serializers and validators. The GP just didn't look for them.