DEV Community

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

Collapse
 
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.