1 package tests 2 3 //easyjson:json 4 type OmitEmptyDefault struct { 5 Field string 6 Str string 7 Str1 string `json:"s,!omitempty"` 8 Str2 string `json:",!omitempty"` 9 } 10 11 var omitEmptyDefaultValue = OmitEmptyDefault{Field: "test"} 12 var omitEmptyDefaultString = `{"Field":"test","s":"","Str2":""}` 13