like
type User struct {
ID int32 `json:"_id"`
Week string `json:"week"`
}
json.Marshal(&User{},true)//omitempty is true
will return
{}
is bson,yaml,sql or any other library support this feature?
like
type User struct {
ID int32 `json:"_id"`
Week string `json:"week"`
}
json.Marshal(&User{},true)//omitempty is true
will return
{}
is bson,yaml,sql or any other library support this feature?