Files
easyjson/tests
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
..
2020-04-15 00:28:30 +03:00
2019-10-09 11:59:07 +03:00
2019-10-09 11:59:07 +03:00
2020-04-08 08:08:39 +09:00
2020-04-15 00:28:30 +03:00
2016-02-28 03:16:29 +03:00
2016-02-28 03:16:29 +03:00