-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proposal: encoding/json: skipping nil values when Unmarshal bytes #53104
Comments
Dup of #22480? |
@mikolajsemeniuk is the omitempty tag not what you need? |
This looks different, but niche: |
I believe anything about @mikolajsemeniuk, what is the representation of the |
@dsnet this is representation of type Variant struct {
Name string `json:"name"`
} |
Currently if w have struct like this:
There is no way to skip nil values so unmarshalling this json:
Will produce:
Would be nice if
Unmarshal
can skipnil
values using something like this:What would product:
The text was updated successfully, but these errors were encountered: