I wrote an example program to illustrate my question, and it can be viewed here: https://play.golang.org/p/6776lYcbBR
So my question is:
when a structure (GameOne) field's name starts with a capital letter, json.Unmarshal works as expected; when it starts with a lower-case letter (GameTwo), the field value is set to its default.
Why is this so? Has it something to do with scope/visibility rules?
Thank you in advance.