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
Related to #1954, one significant change is the way in which Modules register their functionality with ObjectMapper. Changes are needed due to immutability of mappers; however, since Module.SetupContext is an existing abstraction, much or most changes can be insulated.
One necessary change is that owner, accessible via getOwner() of Module.SetupContext, can not be ObjectMapper being built -- it may or may not exist, but more importantly, it is immutable.
The most logical thing to do is to expose actual Builder, but need to use that entity should be minimized (which was already true for owner -- it is is and was a fallback).
Some additional changes that are needed:
Mapper, its builder, and saved state (for rebuilding, JDK serialization) will have to keep track of Modules to register, so there is a new dependency.
as a result Modules now SHOULD be java.io.Serializable; otherwise registering one will prevent ObjectMapper instance from being serializable
Modules are encouraged to try to do as much as possible dynamically in setupModule() method instead of pre-constructing things, and to minimize serializable state they keep
The text was updated successfully, but these errors were encountered:
(from FasterXML/jackson3-dev#4)
Related to #1954, one significant change is the way in which
Module
s register their functionality withObjectMapper
. Changes are needed due to immutability of mappers; however, sinceModule.SetupContext
is an existing abstraction, much or most changes can be insulated.One necessary change is that
owner
, accessible viagetOwner()
ofModule.SetupContext
, can not beObjectMapper
being built -- it may or may not exist, but more importantly, it is immutable.The most logical thing to do is to expose actual
Builder
, but need to use that entity should be minimized (which was already true for owner -- it is is and was a fallback).Some additional changes that are needed:
Module
s to register, so there is a new dependency.Module
s now SHOULD bejava.io.Serializable
; otherwise registering one will preventObjectMapper
instance from being serializablesetupModule()
method instead of pre-constructing things, and to minimize serializable state they keepThe text was updated successfully, but these errors were encountered: