Skip to content

Support for omitzero tag added in Go 1.24 #471

@perher

Description

@perher

In Go 1.24 json marshalling added support for omitzero struct tag. One of the main differences when using this instead of omitempty is that empty slices are now emitted as empty arrays instead of being skipped.

This tag is also supported in go-viper's fork of mapstructure starting from 2.3.0 version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions