Spring Integration
  1. Spring Integration
  2. INT-2831

Add support for Jackson 2.1 (JsonToObjectTransformer, ObjectToJsonTransformer)

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 2.2 RC3
    • Fix Version/s: 3.0 M2
    • Component/s: Core
    • Labels:

      Description

      Add support for Jackson 2.1 to JsonToObjectTransformer, ObjectToJsonTransformer.

      old jackson: import org.codehaus.jackson.map.ObjectMapper;
      new jackson 2.1: import com.fasterxml.jackson.databind.ObjectMapper;

        Issue Links

          Activity

          Hide
          Artem Bilan added a comment -

          Guys, thanks for your attention to this one and sorry, that I didn't share my thoughts before: I was fighting with memory leaks around in-memory queues and aggregators in one of my projects .

          So, now on the matter.

          My suggestion to introduce some JsonMapper wrapper strategy and make two implementations for Jackson 1 & 2 injections to it respectively. And, of course, it will be easy to do any other implementatios, e.g. I have some old my own solution with @JsonTransient (I didn't know Jackson lib 5 years ago ).
          And further follow with classpath scanning for Jackson libs as it is done in the Spring MVC, if there is no provided JsonMapper referense into o-t-j-t and j-t-o-t.

          WDYT now?

          P.S. When do you plan to release M2? Should I hurry up with this?

          Show
          Artem Bilan added a comment - Guys, thanks for your attention to this one and sorry, that I didn't share my thoughts before: I was fighting with memory leaks around in-memory queues and aggregators in one of my projects . So, now on the matter. My suggestion to introduce some JsonMapper wrapper strategy and make two implementations for Jackson 1 & 2 injections to it respectively. And, of course, it will be easy to do any other implementatios, e.g. I have some old my own solution with @JsonTransient (I didn't know Jackson lib 5 years ago ). And further follow with classpath scanning for Jackson libs as it is done in the Spring MVC, if there is no provided JsonMapper referense into o-t-j-t and j-t-o-t. WDYT now? P.S. When do you plan to release M2? Should I hurry up with this?
          Hide
          Gary Russell added a comment -

          JIRA says end of next week for M2, but I don't think that will happen - we have too many big PRs to review (Mark will correct me if I'm wrong).

          I am not sure about scanning the classpath to pick a version when no ObjectMapper injected - what if both are on the classpath? I suppose we could select v2 if that happens - what does MVC do?

          Show
          Gary Russell added a comment - JIRA says end of next week for M2, but I don't think that will happen - we have too many big PRs to review (Mark will correct me if I'm wrong). I am not sure about scanning the classpath to pick a version when no ObjectMapper injected - what if both are on the classpath? I suppose we could select v2 if that happens - what does MVC do?
          Hide
          Mark Fisher added a comment -

          I just bumped M2 one more week to April 5. Sorry, but I should have more time over the next 2 weeks than I've had recently.

          Show
          Mark Fisher added a comment - I just bumped M2 one more week to April 5. Sorry, but I should have more time over the next 2 weeks than I've had recently.
          Hide
          Artem Bilan added a comment - - edited

          I suppose we could select v2 if that happens - what does MVC do?

          Prefer Jackson 2, see RestTemplate

          I should have more time over the next 2

          But I don't hope, that I will have enough time to participate with you: I have to do several releases too .
          I'd ask you to review my PRs ASAP, so I could make polishing.

          And this one I'm going to do over weekend.

          Show
          Artem Bilan added a comment - - edited I suppose we could select v2 if that happens - what does MVC do? Prefer Jackson 2, see RestTemplate I should have more time over the next 2 But I don't hope, that I will have enough time to participate with you: I have to do several releases too . I'd ask you to review my PRs ASAP, so I could make polishing. And this one I'm going to do over weekend.
          Show
          Artem Bilan added a comment - PR: https://github.com/SpringSource/spring-integration/pull/774

            People

            • Assignee:
              Artem Bilan
              Reporter:
              Alexander Kharitonov
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1d
                1d
                Remaining:
                Time Spent - 0.5d Remaining Estimate - 0.5d
                0.5d
                Logged:
                Time Spent - 0.5d Remaining Estimate - 0.5d
                0.5d