-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duration support #689
Merged
Merged
Duration support #689
+337
−25
Commits on Aug 3, 2023
-
Handle
kotlin.time.Duration
asjava.time.Duration
Adds converter and deserializer which bridges conversions between `kotlin.time.Duration` and `java.time.Duration`. Notes: * later Kotlin version adds dedicated method `kotlin.time.Duration.toJavaDuration()` which can be used instead ISO parsing (in converter) * ...and adds dedicated extension method `java.time.Duration.toKotlinDuration()` which can be used instead ISO parsing (in deserializer)
Configuration menu - View commit details
-
Copy full SHA for cf5281c - Browse repository at this point
Copy the full SHA cf5281cView commit details -
Add Duration tests for data class
In order to properly deserialize data class with duration following hacks are needed: * class need to have explicit static factory annotated with ``@JsonCreator`, primary ctor won't cut it * in data class definition value-class getter has to be annotated with Duration converter
Configuration menu - View commit details
-
Copy full SHA for 7a61b3f - Browse repository at this point
Copy the full SHA 7a61b3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a1ba894 - Browse repository at this point
Copy the full SHA a1ba894View commit details -
Configuration menu - View commit details
-
Copy full SHA for efeb17f - Browse repository at this point
Copy the full SHA efeb17fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 58ca164 - Browse repository at this point
Copy the full SHA 58ca164View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc2a0b3 - Browse repository at this point
Copy the full SHA bc2a0b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 79d8e4e - Browse repository at this point
Copy the full SHA 79d8e4eView commit details
Commits on Aug 5, 2023
-
Add doc note about current limitations
Kotlin Duration is value class and as Jackson has limited support of such cases it falls under few limits: * data classes with Duration needs to have explicit creator method * Duration fields has to be annotated with explicit `@JsonDeserializer` annotation See `DurationTests` for details.
Configuration menu - View commit details
-
Copy full SHA for b56e139 - Browse repository at this point
Copy the full SHA b56e139View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9709b83 - Browse repository at this point
Copy the full SHA 9709b83View commit details
Commits on Aug 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7161b2b - Browse repository at this point
Copy the full SHA 7161b2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a0151d4 - Browse repository at this point
Copy the full SHA a0151d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdc58b4 - Browse repository at this point
Copy the full SHA bdc58b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fba300 - Browse repository at this point
Copy the full SHA 4fba300View commit details -
Configuration menu - View commit details
-
Copy full SHA for e650766 - Browse repository at this point
Copy the full SHA e650766View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2e51b4 - Browse repository at this point
Copy the full SHA f2e51b4View commit details -
Add related issue reference in docs
Co-authored-by: wrongwrong <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 73bf682 - Browse repository at this point
Copy the full SHA 73bf682View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.