Files
easyjson/bootstrap
Nicolas S. Dade 89250dbfdd Support for json:",omitzero" tag (#429)
* add support for the json:",omitzero" tag

omitzero was added to the go stdlib encoder/json in go 1.24

* add case which omitempty missed: uintptr is encodable in json

and does accept omitempty in the go stdlib encoder/json.

* add omitzero test cases for pointer-to-"" and pointer-to-{}

(both should marshal to something in order to match stdlib json, and
they do)

* fix and add tests for the case when omitzero is combined with omitempty

Without a special case the generated code can look like

   if v != nil && v != nil {
or
   if v != "" && v != "" {

and that gets flagged by go vet (go 1.25.5)
2026-03-14 17:51:56 +03:00
..