-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
3.xIssues to be only tackled for Jackson 3.x, not 2.xIssues to be only tackled for Jackson 3.x, not 2.x
Milestone
Description
(from FasterXML/jackson3-dev#4)
Related to #1954, one significant change is the way in which Module
s 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
Module
s to register, so there is a new dependency.- as a result
Module
s now SHOULD bejava.io.Serializable
; otherwise registering one will preventObjectMapper
instance from being serializable
- as a result
- 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
Metadata
Metadata
Assignees
Labels
3.xIssues to be only tackled for Jackson 3.x, not 2.xIssues to be only tackled for Jackson 3.x, not 2.x