Comments (4)
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 hasjackson-datatype-jsr310
module has support for Java 8 date/time datatypesjackson-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.
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.
@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.
@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)
- `LocalDateTime` serialization issue with custom-configured `LocalDateTimeSerializer` HOT 12
- InstantDeserializer fails to parse negative numeric timestamp strings for pre-1970 values. HOT 2
- Custom java time module ignored after upgrade to 2.16 HOT 3
- `Optional` deserialization, serialization ignore `contentConverter` HOT 1
- NPE when serializing a `LocalDate` or `LocalDateTime` using `AsDeductionTypeSerializer` HOT 9
- OffsetTimeSerializer not writing seconds for time object like 15:30:00Z (where seconds is 00) HOT 2
- Implicit name provided by `ParameterNamesModule` overridden by "incomplete" `@JsonProperty` HOT 1
- I don't deserialize java 8 date/time type `java.time.Instant` HOT 2
- ZonedDateTime not serialised as UTC by default HOT 1
- Instants get not deserialized as expected sometimes HOT 2
- Only `DateTimeFormatter.ISO_OFFSET_DATE_TIME` accepted by `ZonedDateTimeKeyDeserializer` HOT 1
- Can't deserialize OffsetDateTime.MIN: Invalid value for EpochDay
- Date and time serialization are very inconsistent HOT 3
- Absent nested optional shennanigans HOT 1
- The serialization of an object of type LocalDate did not record its type HOT 2
- Q on Serializing java.time dates w/o nano parts HOT 2
- Add javaTimeModule.addDeserializer(String.class,...) Error parsing generated later HOT 4
- java.lang.NoSuchFieldError: READ_DATE_TIMESTAMPS_AS_NANOSECONDS after update to 2.16 or 2.17 HOT 3
- Parameter names: Class with a single-parameter implicit constructor fails deserialization, works if more (unused) parameters are added HOT 3
- Inconsistent BeanPropertyDefinition#couldDeserialize and actual deserialization behavior HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jackson-modules-java8.