mirror of
https://github.com/nspcc-dev/neofs-sdk-go.git
synced 2026-03-01 04:29:18 +00:00
Do not emit unset fields in JSON #280
Labels
No labels
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U2
U2
U3
U4
blocked
bug
client
config
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
performance
pool
question
security
task
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-sdk-go#280
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @cthulhu-rider on GitHub (Sep 16, 2025).
Is your feature request related to a problem? Please describe.
I'm always frustrated when message binary does not change but JSON does
currently, when proto message is extended with new field(s), they start to appear in producing JSON even when unset. I see following cons in this:
i don't see any pros
Describe the solution you'd like
omit empty fields
see
nspcc-dev/neofs-sdk-go@3c286a4986/internal/proto/encoding.go (L70)@roman-khimov commented on GitHub (Sep 16, 2025):
Related to #681, there is
omitzerostarting from 1.24 which is much more convenient to use.