question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for JSR-310 (Date and Time)

See original GitHub issue

Are there plans to support JSR-310 (java.time.LocalDate, java.time.LocalDateTime, java.time.LocalTime, etc)?

Currently (version 1.5.0), needs to register converters. For example:

mapperFactory.getConverterFactory()
        .registerConverter(new PassThroughConverter(LocalDate.class));

I will be happy, if it conversion becomes built-in.

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

3reactions
nathansgreencommented, Dec 12, 2016

chanjarster On top of TemporalAccessor you also need at least TemporalAmount and possibly TemporalUnit. Registering a pass-through converter for those 3 interfaces covers all of the use cases I’ve run into.

1reaction
ndr-brtcommented, Dec 11, 2016

For sure this is an interesting one 😃

Just for start a discussion, this is a list of the types relatives to this specification I found, I’m not sure the list is complete, but maybe someone can help 😃

  • Instant
  • Duration
  • LocalDate
  • LocalTime
  • LocalDateTime
  • ZonedDateTime
  • DayOfWeek
  • Month
  • MonthDay
  • OffsetDateTime
  • OffsetTime
  • Period
  • Year
  • YearMonth
  • ZonedDateTime
  • ZoneOffset
Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I enable the JSR310 support for LocalDate using ...
... Java 8 date/time type java.time.LocalDate not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" ...
Read more >
How to Handle Java 8 Dates and Time with Jackson in Spring ...
However, it still can be tricky with certain frameworks when using new features like the Date and Time API (known as JSR-310).
Read more >
JSR 310 Part 3 : Java 8 Date and Time API - amitph
The Date and Time support is a very important part of any programming language and having a stronger Date and Time support makes...
Read more >
Correctly handle JSR-310 (java 8) dates with Jackson
One of the most awesome features in Java 8 is the Date and Time API, also known as JSR-310. By default, Jackson will...
Read more >
Usage of Java date and time types in HTDS - IBM
You can find the XML adapter classes in the <installDir> /executionserver/lib/jaxb-jsr310-support-1.1.3-IBM.jar file. You do not need to deploy this jar file in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found