Comments (8)
Thank you for reporting this. I'll have a look.
from jackson-modules-java8.
Ah. I think I see what is happening here. What comment is trying to say is that the module auto-registered will be JSR310Module
, due to entry in:
src/main/resources/META-INF/services/com.fasterxml.jackson.databind.Module
and that is the default due to legacy reasons. So it is correct in a way, although badly phrased.
I will change this in 3.0 to use the new module.
from jackson-modules-java8.
Updated javadoc a bit; fixed registration for master
(3.0.0-SNAPSHOT)
from jackson-modules-java8.
Yeah, it was a bit badly phrased, but I understood it.
The problem I see is how the github documentation is. It doesn't explain that the legacy version is the one to be registered, it just says that the module can be auto-registered, so people will only know about this if they read the javadoc, the ones copying and pasting from the github website will get the legacy version without knowing.
from jackson-modules-java8.
The documentation says:
Usage
Registering module
Starting with Jackson 2.2, Modules can be automatically discovered using the Java 6 Service Provider Interface (SPI) feature. You can activate this by instructing an ObjectMapper to find and register all Modules:
ObjectMapper mapper = new ObjectMapper();
mapper.findAndRegisterModules();
You should use this feature with caution as it has performance implications. You should generally create one constant ObjectMapper instance for your entire application codebase to share, or otherwise use one of ObjectMapper's findModules methods and cache the result.
If you prefer to selectively register this module, this is done as follows, without the call to findAndRegisterModules():
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new JavaTimeModule());
After either of these, functionality is available for all normal Jackson operations.
from jackson-modules-java8.
Oh. I did not check github README, only Javadocs. Thanks for pointing this out.
from jackson-modules-java8.
Updated README as well. Let me know if that still does not make sense, and/or you have suggestions for improvement.
from jackson-modules-java8.
There's a ;
on another line, don't know if this was on purpose to "close" the ObjectMapper
create, but besides this, it all looks perfectly clear for me now, thank you for taking the time!
from jackson-modules-java8.
Related Issues (20)
- Xml cannot read in Optional.empty HOT 6
- Add `JavaTimeFeature.NORMALIZE_DESERIALIZED_ZONE_ID` to allow disabling ZoneId normalization on deserialization HOT 5
- Jacskon canβt serialize Duration with Long.MIN_VALUE HOT 2
- Milliseconds timestamps not parsing correctly for `LocalDate` even with `READ_DATE_TIMESTAMPS_AS_NANOSECONDS` as FALSE HOT 8
- Breaking change in `InstantDeserializer API between 2.15 and 2.16 HOT 1
- `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
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.