Code Monkey home page Code Monkey logo

Comments (4)

cowtowncoder avatar cowtowncoder commented on July 30, 2024

I think you may have misunderstood what modules in question provide; Jdk8Module is NOT a replacement for JSR310Module -- instead, JavaTimeModule is.

While name Jdk8Module is bit misleading, it comes from Maven package jackson-datatype-jdk8 which is just part of support for Java 8:

  • jackson-module-parameter-names adds support for accessing method/constructor parameter names that Java 8 bytecode has
  • jackson-datatype-jsr310 module has support for Java 8 date/time datatypes
  • jackson-datatype-jdk8 modules has support for other additions: most importantly optionals.

This division of modules has been in place during Jackson 2.x and can not be simply changed without other complications. But with Jackson 3.x baseline for JDK will be increased so that module structure will probably be changed -- most likely so that "optionals" and parameter-names support will be in-built, and date/time types remain as an add-on (due to size of module; other 2 aspects are relatively small).

from jackson-modules-java8.

pragmaticway avatar pragmaticway commented on July 30, 2024

But jackson-datatype-jsr310 stated as DEPRECATED.

It says:
(DEPRECATED) -- moved under jackson-modules-java8

See https://github.com/FasterXML/jackson-datatype-jsr310

from jackson-modules-java8.

cowtowncoder avatar cowtowncoder commented on July 30, 2024

@pragmaticway Yes: the git repository itself is deprecated, and module within has moved under jackson-moduleS-java8, which is a multi-maven-module repository. Did you look at that repository to try to understand how things work?

I can understand that this might be confusing, but I would hope users take some time to try to solve the problem, and where applicable, suggest improvements to descriptions. I will try to improve the wording to reduce confusion.

from jackson-modules-java8.

pragmaticway avatar pragmaticway commented on July 30, 2024

@cowtowncoder Thank you for clarifying!

Yes indeed the documentation about deprecated module is somewhat ambiguous and confusing. Myself and my teammates were under impression that we supposed to use Jdk8Module instead of deprecated JSR310Module - but in fact it turned out its not, instead we should use another module dedicated to java8 new Date classes which for some reason located in "deprecated" package jsr310, e.g.: com.fasterxml.jackson.datatype.jsr310.JavaTimeModule

That was adding to the confusion. Now since its clarified that jsr310 module is not deprecated, it makes more sense.
I think it will be a benefit to the community if the documentation cleared up regarding this "JSR310 deprecated statement"

from jackson-modules-java8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.