You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Behavior of zapcore.MapObjectEncoder does not match behavior of zapcore.jsonEncoder with respect to OpenNamespace.
MapObjectEncoder.OpenNamespace create a new map and automatically closes the namespace. jsonEncoder which operates on a single byte buffer in memory and keeps the namespace open.
I will provide example code in the coming days.
The text was updated successfully, but these errors were encountered:
Add test cases to demonstrate uber-go#554,
how jsonEncoder and MapObjectEncoder handle namespaces differently.
Specifically: When foo.MarshalLogObject uses OpenNamespace,
jsonEncoder.AddObject does not close the namespace.
MapObjectEncoder does not match jsonEncoder
(uber-go#554)
Problem was that new openNamespaces that are created during AppendObject() call were not closed.
Note, ONLY new openNamespaces that are created during AppendObject() are closed. If they were created at prior to AppendObject() call, it will remain open till EncodeEntry() call completes.
Behavior of
zapcore.MapObjectEncoder
does not match behavior ofzapcore.jsonEncoder
with respect toOpenNamespace
.MapObjectEncoder.OpenNamespace
create a new map and automatically closes the namespace.jsonEncoder
which operates on a single byte buffer in memory and keeps the namespace open.I will provide example code in the coming days.
The text was updated successfully, but these errors were encountered: