Exactly. Thx Tatu On Saturday, 11 March 2023 at 03:33:53 UTC+1 Tatu Saloranta wrote:
> On Fri, Mar 10, 2023 at 11:28 AM Igor Wojda <[email protected]> wrote: > > > > Hi > > > > How can I parse LoaclDateTime to ISO 8601 format? > > I think your question is actually "how do I WRITE (serialize) > LocalDateTime as JSON String using ISO-8601 format". > Parsing would mean reading JSON String into LocalDateTime, which > probably works fine. > Now, by default date/time values are written as timestamps (numbers); > you need to configure handling like so: > > > > > Scenario: > > val data class task(val name: String, val loaclDateTime: LoaclDateTime) > > > > val objectMapper = ObjectMapper() > > objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); > > and then output should contain ISO-8601 formatted JSON String instead of > number. > > Hope this helps, > > -+ Tatu +- > -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/53537fbe-3135-4f90-989d-8ca42fd330c6n%40googlegroups.com.
