Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ dependencies {

implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
compileOnly("io.micrometer:micrometer-core:latest.release")
implementation("com.fasterxml.jackson.module:jackson-module-parameter-names:2.17.2")
// Blackbird generates LambdaMetafactory-backed property accessors so
// Jackson skips the reflective MethodHandle path. ~1.5-2x on real RPC
// traffic per a JMH bench replaying a captured trace from `mod run`
// org.openrewrite.node.migrate.upgrade-node-24 — measurable on the
// GetObject deserialize path where field counts in nested Maps are high.
implementation("com.fasterxml.jackson.module:jackson-module-blackbird:2.17.2")
implementation("com.fasterxml.jackson.module:jackson-module-parameter-names:2.21.1")
testImplementation("org.openrewrite:rewrite-test:latest.release")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.fasterxml.jackson.databind.json.JsonMapper;
import com.fasterxml.jackson.databind.util.TokenBuffer;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.module.blackbird.BlackbirdModule;
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
import io.moderne.jsonrpc.JsonRpcError;
import io.moderne.jsonrpc.JsonRpcMessage;
Expand All @@ -48,7 +47,7 @@ public JsonMessageFormatter() {
// see https://cowtowncoder.medium.com/jackson-2-12-most-wanted-3-5-246624e2d3d0
.constructorDetector(ConstructorDetector.USE_PROPERTIES_BASED)
.build()
.registerModules(new ParameterNamesModule(), new JavaTimeModule(), new BlackbirdModule())
.registerModules(new ParameterNamesModule(), new JavaTimeModule())
.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
.setSerializationInclusion(JsonInclude.Include.NON_NULL));
mapper.setVisibility(mapper.getSerializationConfig().getDefaultVisibilityChecker()
Expand All @@ -62,7 +61,7 @@ public JsonMessageFormatter(com.fasterxml.jackson.databind.Module... modules) {
this(JsonMapper.builder()
.constructorDetector(ConstructorDetector.USE_PROPERTIES_BASED)
.build()
.registerModules(new ParameterNamesModule(), new JavaTimeModule(), new BlackbirdModule())
.registerModules(new ParameterNamesModule(), new JavaTimeModule())
.registerModules(modules)
.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
.setSerializationInclusion(JsonInclude.Include.NON_NULL));
Expand Down
Loading