If the struct field is not exported, it's not available for reflection
and json.Unmarshal() can't use it. You can define a custom UnmarshalJSON
function if you need special treatment. You don't even have to
reimplement the functionality yourself, you can create a non-exported
custom type that represents the JSON document. This type would have
exported Fields and would be usable by json.Unmarshal. You'd them
embed this type into your special type and implement UnmarshalJSON
by calling json.Unmarshall.
Here is the revere problem:
http://play.golang.org/p/6CQCju_tpL
--
Aram Hăvărneanu