Jackson 2 to 3 migration companion code
Three Maven modules - jackson2-before (2.22.1), jackson3-after (3.2.1) and a coexistence module with BOTH majors on one classpath - so every claim in the two migration guides is executed rather than asserted. Paired class names make the before/after outputs directly diffable via run-all.sh. Confirms the guides on wire-format equivalence (10-case suite, zero mismatches), classpath coexistence and the collapse of four artifacts into one. Corrects nine points, including that enableDefaultTyping() is still present in Jackson 2.22.1 rather than removed in 2.16, and that the published "after" mapper snippet does not compile.
This commit is contained in:
12
docs/output/coexistence-S06BothOnOneClasspath.txt
Normal file
12
docs/output/coexistence-S06BothOnOneClasspath.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
jackson 2 class : com.fasterxml.jackson.databind.ObjectMapper
|
||||
jackson 3 class : tools.jackson.databind.json.JsonMapper
|
||||
|
||||
jackson 2 output: {"booking_id":1,"travel_date":"2026-09-15"}
|
||||
jackson 3 output: {"booking_id":1,"travel_date":"2026-09-15"}
|
||||
wire-compatible : true
|
||||
|
||||
3 reads 2's JSON: Booking[id=1, travelDate=2026-09-15]
|
||||
2 reads 3's JSON: Booking[id=1, travelDate=2026-09-15]
|
||||
|
||||
annotation from : jackson-annotations-2.22.jar
|
||||
<- one jackson-annotations jar, used by both majors
|
||||
Reference in New Issue
Block a user