Fields of struct you want to Marshal or Unmarshal must be exported.
Check it out: http://blog.golang.org/json-and-go
The json package only accesses the exported fields of struct types
(those that begin with an uppercase letter). Therefore only the the
exported fields of a struct will be present in the JSON output.
Working sample: Go playground