Discussion on: May 8th, 2020: What did you learn this week?

anusha_bhat profile image
Anusha Bhat

In Go, when you want to unmarshall a json into an unexported struct, its fields should be exported. This is because json is a different package and doesn't have the power to view fields unless they are exported.

citizen428 profile image
Michael Kohl

I think this trips up many people at first. At least after that, you'll remember for sure.