Comments (6)
On adding feature: PRs welcome.
from jackson-modules-java8.
Cheers! I'll try and rustle up something.
from jackson-modules-java8.
Hmmh. But what is the need to use "quoted numbers" instead of plain numbers?
from jackson-modules-java8.
Hmmh. But what is the need to use "quoted numbers" instead of plain numbers?
Unfortunately the data I'm reading is using timestamps formatted as quoted numbers. The systems producing this data are rather old and peculiar. And I would agree that in principle they need not be this way. But this is the reality I'm working with.
Nevertheless, without a formatter (i.e. @JsonFormat
annotation) it is possible to read these dates in the current implementation. It is currently possible to de-serialize "3.141592653"
into a ZoneDateTime
. However when adding the @JsonFormat
annotation this is no-longer the case. This is the inconsistency I'm trying to address.
Unfortunately I can not access the issue that prompted the original addition of the "read qouted numbers as timestamps" feature (datatype-jsr310#16
) but looking at FasterXML/jackson-datatype-jsr310@f85c708 that resolved it appears to be a similar use-case.
So I am not looking to enable a novel use for quoted numbers, rather I'm looking to make an already supported use-case consistent with other features of the library.
from jackson-modules-java8.
Ok. That makes sense.
So, I am not against supporting such use cases; my main concern is with API. Unfortunately whereas there is now extensive configurability for "alternative Shapes" (accept String
where Number
is expected) is not quite what we have here, because Date/Time DOES accept String values (ISO-8610) but rather "String that is actually a Number. Because of that extra configurability is indeed needed.
But I am trying to limit use of DeserializationConfig
for very specific/targeted uses: it should be for "bigger" features -- there are some legacy settings that are different, but for new things they should be general-purpose ones.
Given this, I think I would actually suggest adding configurability in JavaTimeModule
; especially since this is not meant to affect JDK or Joda date/time types.
If this can be done, I'd be happy to get it merged.
I'll add similar note to jackson-databind
issue.
from jackson-modules-java8.
Cheers. I'll have a look at how to accomplish this. Might take a little while.
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 3
- 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 4
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.