-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
We can be pretty smart around this implementation by optimizing for locations where marker values can be used to represent an optional value. The simplest example is an out of bounds number: if the serialized value for zap.optional(zap.u8(1, 50)) is 0 that can mark the value as nil without needing a boolean flag to be sent.
This optimization can and should apply in other less trivial places, such as encoding 0 in an optional array, set, or map length to mean nil, and for all other values subtracting 1 get the actual length.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request