Skip to content

Support for omit empty in tag #46

@hotrungnhan

Description

@hotrungnhan
type Example struct {
    Field1 string `json:"field1,omitempty"`
    Field2 int    `json:"field2,omitempty"`
    Field3 bool   `json:"field3,omitempty"`
    Field4 *int   `json:"field4,omitempty"`
}

JSon have this omitempty to omit a field if it empty. is there anyway to do similar thing in this library boss @shamaton ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions