commit 6a41f788201e627bf442d83df6d4a505ed9dd3cb
parent 493ce7aea4e9bd569f393766eb51dd7ab9d9d91b
Author: francoispqt <francois@parquet.ninja>
Date: Sun, 24 Jun 2018 23:24:20 +0800
update documentation
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/gojay/README.md b/gojay/README.md
@@ -49,11 +49,13 @@ You can add tags to your structs to control:
- skip a struct field only for unmarshaling
- skip a struct field only for marshaling
- skip a struct field
+- the use of omit empty methods for marshaling
### Example:
```go
type A struct {
Str string `gojay:"string"`
+ StrOmitEmpty string `gojay:"string,omitempty"`
SkipUnmarshal string `gojay:"skipUnmarshal,-u"`
SkipMarshal string `gojay:"skipMarshal,-m"`
Skip string `gojay:"-"`