We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For example, when encoding the following struct instance to JSON:
type Example struct { Name patch.Field[string] `json:"name"` Age patch.Field[int] `json:"age"` } patch := &Example{ Name: patch.Field[string]{Valid: false}, Age: patch.Field[int]{Valid: true, Value: 10}, }
Encode patch to JSON:
patch
Got:
{"name": "", "age": 10}
Expect:
{"age": 10}
The text was updated successfully, but these errors were encountered:
It's not easy to solve this problem currently. Hold.
Keep an eye on the following related issues:
MarshalJSON() ([]byte, error)
Sorry, something went wrong.
ggicci
No branches or pull requests
For example, when encoding the following struct instance to JSON:
Encode
patch
to JSON:Got:
Expect:
The text was updated successfully, but these errors were encountered: