diff --git a/examples/json/json.go b/examples/json/json.go index 62bc1ea..aaf4bac 100644 --- a/examples/json/json.go +++ b/examples/json/json.go @@ -14,6 +14,8 @@ type response1 struct { Page int Fruits []string } +// Only exported fields will be encoded/decoded in JSON. +// Fields must start with capital letters to be exported. type response2 struct { Page int `json:"page"` Fruits []string `json:"fruits"`