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
The ObjectFieldsAppenderMarker maintains a cache of "unwrapping" JsonSerializer to use to serialise the object value and avoid creating for each invocation. When no suitable JsonSerializer can be found in the cache, a new one is created. This new instance is created from the ObjectMapper returned by the JsonGenerator given as argument to the current invocation. It is then added to the cache with the object's class as key.
A second attempt at serialising a value of the same class will therefore use a JsonSerializer obtained from the cache. However, there is no guarantee that the JsonGenerator passed as argument uses the same ObjectMapper as the one used when creating the JsonSerializer obtained from the cache.
The text was updated successfully, but these errors were encountered:
- Maintain a separate cache of JsonProvider per ObjectMapper
- do not create a new instance of SerializerProvider ourselves but instead use ObjectMapper#getSerializerProviderInstance introduced in Jackson 2.7
- do not create a JsonSerializer for the object class ourselves but instead delegate to Jackson SerializerProvider and therefore leverage its internal cache
Addresses issue #642
- Maintain a separate cache of JsonProvider per ObjectMapper
- do not create a new instance of SerializerProvider ourselves but instead use ObjectMapper#getSerializerProviderInstance introduced in Jackson 2.7
- do not create a JsonSerializer for the object class ourselves but instead delegate to Jackson SerializerProvider and therefore leverage its internal cache
Addresses issue #642
- Maintain a separate cache of JsonProvider per ObjectMapper
- do not create a new instance of SerializerProvider ourselves but instead use ObjectMapper#getSerializerProviderInstance introduced in Jackson 2.7
- do not create a JsonSerializer for the object class ourselves but instead delegate to Jackson SerializerProvider and therefore leverage its internal cache
Addresses issue #642
The
ObjectFieldsAppenderMarker
maintains a cache of "unwrapping" JsonSerializer to use to serialise the object value and avoid creating for each invocation. When no suitable JsonSerializer can be found in the cache, a new one is created. This new instance is created from the ObjectMapper returned by the JsonGenerator given as argument to the current invocation. It is then added to the cache with the object's class as key.A second attempt at serialising a value of the same class will therefore use a JsonSerializer obtained from the cache. However, there is no guarantee that the JsonGenerator passed as argument uses the same ObjectMapper as the one used when creating the JsonSerializer obtained from the cache.
The text was updated successfully, but these errors were encountered: