fix documentation typos

master
Felix Lange 8 years ago
parent 627ec9333a
commit e94794fd37
  1. 6
      README.md
  2. 6
      main.go

@ -9,13 +9,13 @@ features which the standard json package cannot offer.
### Struct Tags ### Struct Tags
All fields are required unless the "optional" struct tag is present. The generated All fields are required unless the "optional" struct tag is present. The generated
unmarshaling method return an error if a required field is missing. Other struct tags are unmarshaling method returns an error if a required field is missing. Other struct tags are
carried over as is. The standard "json" and "yaml" tags can be used to rename a field when carried over as is. The standard "json" and "yaml" tags can be used to rename a field when
marshaling to/from JSON. marshaling.
Example: Example:
type foo { type foo struct {
Required string Required string
Optional string `optional:""` Optional string `optional:""`
Renamed string `json:"otherName"` Renamed string `json:"otherName"`

@ -14,13 +14,13 @@ features which the standard json package cannot offer.
Struct Tags Struct Tags
All fields are required unless the "optional" struct tag is present. The generated All fields are required unless the "optional" struct tag is present. The generated
unmarshaling method return an error if a required field is missing. Other struct tags are unmarshaling method returns an error if a required field is missing. Other struct tags are
carried over as is. The standard "json" and "yaml" tags can be used to rename a field when carried over as is. The standard "json" and "yaml" tags can be used to rename a field when
marshaling to/from JSON. marshaling.
Example: Example:
type foo { type foo struct {
Required string Required string
Optional string `optional:""` Optional string `optional:""`
Renamed string `json:"otherName"` Renamed string `json:"otherName"`

Loading…
Cancel
Save