Open
Description
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:
Got:
{"name": "", "age": 10}
Expect:
{"age": 10}
Metadata
Metadata
Assignees
Labels
No labels