You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The biggest question seems to be whether package P generating json of package Q's data structures should be able to change the way package Q's data structures encode. If different packages using Q's data disagree about whether to omitempty, it seems like that might lead to confusion.
That's a big consequence for the convenience of saving a few characters.
Now, encoding/json should omit empty value if json tag contains
omitempty
:But this is too annoying if many fields should omit empty value.
Can we add an option
omitempty
to json.Encoder?, e.g.The text was updated successfully, but these errors were encountered: