protogen: Always marshal empty fields #122
No reviewers
TrueCloudLab/storage-core-developers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-api-go#122
Loading…
Reference in a new issue
No description provided.
Delete branch "fyrchik/frostfs-api-go:fix-enum-marshaling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is how it was done previously:
return protojson.MarshalOptions{
The tricky part is
[]byte
which is marshaled asnull
by easyjsonhelper, but as
""
by protojson.Signed-off-by: Evgenii Stratonikov e.stratonikov@yadro.com
1ec1762d3a
to29c522d5d8
Seems like it breaks this test in SDK
/cc @fyrchik @pogpp
I will look into it, the current behaviour should've been identical to the protojson lib.
I have found the bug -- empty string seem indeed to unmarshal to nil, which is strange, considered that I have explicitly checked this exact behaviour in the PR, probably missed something.