-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Move jackson-datatype-jsr310
into jackson-databind
#5032
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
Conversation
…t enabled
…the box
@@ -0,0 +1,226 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good -- I like this idea -- making it work much like modules, without having to be one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far -- aside from maybe changing package I think this would work.
LGTM: what do you think @JooHyukKim? (since you are module maintainer) |
@cowtowncoder yes! LGTM at high level.
@pjfanning you are saying its WIP, may I ask what the remaining pieces are? |
I'm happy to treat this as ready to merge at this stage. |
Just one concern I have is how easy it would be to forward merge changes in Jackson 2 version of jsr310 module, good thing is that the module itself does not have frequent changes |
That is a valid concern. Not sure we can do a lot about it. I feel merging still makes sense, tho, overall. WDYT? |
I think the JSR310 support is pretty stable. Forward fitting to master (3.0) branches is fairly complicated already. This change doesn't really even make it much more complicated. |
While there are some kinks to be sure (git seems to lose tracking of some heavily changed renamed classes), overall for modules forward merging has been doable. So I agree, it's just a degree of additional complexity. So I think we can live with it. WDYT @JooHyukKim ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* | ||
* @since 2.16 | ||
*/ | ||
public enum JavaTimeFeature implements JacksonFeature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, I think we should actually change the idea here to create new DateTimeFeature
that should ideally control ALL date/time handling (mostly concerning then old java.util
Date/Calendar and Joda date/time).
It would contain entries we have here, initially, but then see if we could move existing DeserializationFeature
s/SerializationFeature
s that are date/time specific into this new enum.
This would then be a building block for
https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-5
Finally, renamed DateTimeFeature
should go in tools.jackson.databind.cfg
along with existing EnumFeature
and JsonNodeFeature
.
… date/time types
@pjfanning @JooHyukKim I did last tweaking, renaming and am ready to merge this in. Renamed so that
Beyond merging this big PR I will start filing issues for
and hopefully we can address (most of) these for 3.0.0-rc3. |
jackson-datatype-jsr310
into jackson-databind
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). [PR adding JSR310 date support]: FasterXML/jackson-databind#5032
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). [PR adding JSR310 date support]: FasterXML/jackson-databind#5032
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR #251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR #251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032 (cherry picked from commit c1ae512) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR #251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). [PR adding JSR310 date support]: FasterXML/jackson-databind#5032 (cherry picked from commit c1ae512) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032 (cherry picked from commit c1ae512) Signed-off-by: Thomas Farr <[email protected]>
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032 (cherry picked from commit c1ae512)
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR #251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). [PR adding JSR310 date support]: FasterXML/jackson-databind#5032 (cherry picked from commit c1ae512) Signed-off-by: Thomas Farr <[email protected]> Co-authored-by: Ralph Ursprung <[email protected]>
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032 Signed-off-by: psingh3 <[email protected]>
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032 Signed-off-by: psingh3 <[email protected]>
jackson 2.x still supports java 7 and thus does not automatically support java 8 classes. this will change with jackson 3.x (see e.g. this [PR adding JSR310 date support] to 3.x). PR opensearch-project#251 added documentation on how a custom `ObjectMapper` can be registered - but there's no reason why we can't just enable auto-detection centrally. the docs mention that performance should be considered, but this is IMHO not relevant here since we only construct it once and then keep the same `ObjectMapper` (which in turn the docs mention as best practices). Signed-off-by: Ralph Ursprung <[email protected]> [PR adding JSR310 date support]: FasterXML/jackson-databind#5032 Signed-off-by: psingh3 <[email protected]>
@cowtowncoder if you have time, would you be able to review the change from a high level?