Skip to content

Add msgpack-jackson3 module for Jackson 3.x support#4

Closed
komamitsu wants to merge 6 commits into
mainfrom
support-jackson3
Closed

Add msgpack-jackson3 module for Jackson 3.x support#4
komamitsu wants to merge 6 commits into
mainfrom
support-jackson3

Conversation

@komamitsu

Copy link
Copy Markdown
Owner

Summary

  • Adds a new msgpack-jackson3 submodule (jackson-dataformat-msgpack3) that ports the existing Jackson 2.x integration to Jackson 3.x (tools.jackson namespace)
  • Requires Java 17+ and Jackson 3.1.2; the module is excluded from the build on older JDKs so existing Java 8 users are unaffected
  • Includes JMH benchmarks (src/jmh/java) runnable via ./sbt "msgpack-jackson3/jmh:run"

Key differences from msgpack-jackson

  • Package namespace: com.fasterxml.jacksontools.jackson
  • TokenStreamLocation replaces JsonLocation; byte offset passed as columnNr
  • Lightweight MessagePackWriteContext replaces SimpleStreamWriteContext
  • MessagePackFactory.snapshot() delegates to copy(); rebuild() implemented via MessagePackFactoryBuilder
  • MessagePackSerializedString: all append*, put*, write* methods fully implemented
  • NIL map keys now correctly emit PROPERTY_NAME instead of VALUE_NULL
  • Generator and parser ThreadLocals use strong references (~8 KB and ~0.2 KB/thread respectively — negligible compared to Jackson's own per-thread buffer retention)

Test plan

  • ./sbt "msgpack-jackson3/test" — 112 tests pass
  • ./sbt "msgpack-jackson3/jmh:compile" — JMH benchmarks compile cleanly
  • Existing msgpack-core and msgpack-jackson tests unaffected

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants