diff options
Diffstat (limited to 'vendor/github.com/mailru/easyjson/tests/omitempty.go')
-rw-r--r-- | vendor/github.com/mailru/easyjson/tests/omitempty.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/mailru/easyjson/tests/omitempty.go b/vendor/github.com/mailru/easyjson/tests/omitempty.go new file mode 100644 index 000000000..ede5eb95a --- /dev/null +++ b/vendor/github.com/mailru/easyjson/tests/omitempty.go @@ -0,0 +1,12 @@ +package tests + +//easyjson:json +type OmitEmptyDefault struct { + Field string + Str string + Str1 string `json:"s,!omitempty"` + Str2 string `json:",!omitempty"` +} + +var omitEmptyDefaultValue = OmitEmptyDefault{Field: "test"} +var omitEmptyDefaultString = `{"Field":"test","s":"","Str2":""}` |