FasterXML / FasterXML/jackson-modules-java8

Add `JavaTimeFeature.ALLOW_DATES_AS_TIMESTAMPS`

Aperta
#171 5 commenti 1 reazione 0 assegnatari Vedi su GitHub
date-time-config pr-welcome
Lingua principale
Java
Stelle
425
Fork
124
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

With SerializationFeature.WRITE_DATES_AS_TIMESTAMPS it's possible to output date and time data as ISO 8601, but there seems to be no way to only accept date and time data in ISO 8601 format.

Though I'd suggest to add some kind of `DeserializationFeature.ALLOW_DATES_AS_TIMESTAMPS` or `MapperFeature.ALLOW_COERCION_OF_DATES` which disables the coercion of date and time data.

In other words: `{"myInstant": 123456789}` should throw an exception, and only `{"myInstant": "1973-11-29T21:33:09Z"}` should be allowed.

Or is there already an setting that I missed?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.