Skip to content

Support for Jackson 3 #166

Open
Open

Description

@pbartoszek

Are there any plans to support Jackson 3?

Activity

  1. kz282 commented on Dec 15, 2025

    @kz282

    Please see #165

  2. christophejan commented on Dec 28, 2025

    @christophejan

    Hello,

    I was looking for a Jackson 3 compatible version and found that Jackson provides its own support of JsonPatch and JsonMergePatch since Jackson 2.12.2.

    See :

    Even diff seems supported through Json#createDiff and Json#createMergeDiff.

    I think I will try to switch to this Jackson module for JsonPatch and JsonMergePatch.

  3. anandjaisy commented on Jan 6, 2026

    @anandjaisy

    Is this getting merge ?? with spring 7 and spring boot 4 keep facing the issue as

    Caused by: tools.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of com.fasterxml.jackson.databind.JsonNode (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information

  4. zapek commented on Jan 6, 2026

    @zapek

    I think I will try to switch to this Jackson module for JsonPatch and JsonMergePatch.

    Thanks for the suggestion, it actually works! Here's what I did with Spring Boot 4 (don't forget to use Jackson 3 only, not Jackson 2):

    Add dependencies:

    implementation 'tools.jackson.datatype:jackson-datatype-jakarta-jsonp'
    runtimeOnly 'org.leadpony.joy:joy-classic:2.1.0' // JSON-P implementation
    

    To get a patch:

    JsonValue JsonValue.class);
    JsonValue source = objectMapper.convertValue(from, JsonValue.class);
    JsonPatch patch = Json.createDiff(source.asJsonObject(), target.asJsonObject());
    

    To apply the patch:

    JsonValue source = objectMapper.convertValue(from, JsonValue.class);
    JsonObject patched = jsonPatch.apply(source.asJsonObject());
    

    No need for java-json-tools.

  5. stephenmontgomery commented on Mar 1, 2026

    @stephenmontgomery

    @zapek just to be clear - ur solution is not a pure jackson solution (which would be ideal as I'm on Spring Boot) - you still need 2 new dependencies (jackson-datatype-jakarta-jsonp - jackson bridge onto JSONP provider and the JSONP provider ie joy-classic/parsson etc) so really swapping a library for 2 new ones. 3 if u include jakarta.json-api.

    I did use ur instructions as a guide and got a Jackson 2 equivalent working but really it's in preparation for upgrading to SB4/Jackson 3.

    Maybe https://flipkart-incubator.github.io/zjsonpatch/ is a best drop in replacement for java-json-tools?

  6. edmundackah commented on Mar 14, 2026

    @edmundackah

    @zapek @kz282 @stephenmontgomery @pbartoszek @christophejan

    I’ve created a library that follows this API but brings in support for Jackson 3. It’s designed as a drop-in replacement for anyone needing to upgrade. I'm currently running it in production for a high-volume payment gateway, so performance and reliability are baked in. Check out the docs here: https://guisseppe.gitlab.io/json-utils/getting-started

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions