Skip to content
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

Use Jackson ObjectMapper provided by Akka #9494

Merged
merged 10 commits into from
Jul 25, 2019
Merged

Use Jackson ObjectMapper provided by Akka #9494

merged 10 commits into from
Jul 25, 2019

Conversation

marcospereira
Copy link
Member

@marcospereira marcospereira commented Jul 23, 2019

Fixes

Fixes #9383.

Status

  • Finish docs regarding how to use namespaced configurations
  • (optional): bind multiple ObjectMapper based on the name (as supported by Akka)

core/play/src/main/resources/reference.conf Outdated Show resolved Hide resolved
```

### Custom binding for `ObjectMapper`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still valid and possibly simpler than customizing JacksonObjectMapperProvider from Akka, at least from a Play user perspective. But most of the need to do it can be reduced if Akka supports MapperFeatures and others.

I will start a conversation about it with Akka Team.

@marcospereira marcospereira marked this pull request as ready for review July 23, 2019 18:59
Copy link
Contributor

@octonato octonato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Left some minor change request.

@octonato
Copy link
Contributor

@marcospereira, I approved it but added the block-merge because of minor change request. Feel free to remove the label when CR addressed.

marcospereira and others added 2 commits July 24, 2019 00:14
@marcospereira
Copy link
Member Author

Thanks, @renatocaval. Accept your changes and also did some last revision to improve the text.

@octonato
Copy link
Contributor

Resolved merge conflict, your turn Travis!

@mergify mergify bot merged commit c576024 into playframework:master Jul 25, 2019
@marcospereira marcospereira deleted the issues/9383/use-akka-jackson-object-mapper branch July 25, 2019 18:26
@ihostage ihostage mentioned this pull request Jul 26, 2019
3 tasks

"ObjectMapper" should {
"respect the custom configuration" in new JsonScope {
Json.mapper().isEnabled(SerializationFeature.WRITE_DATES_WITH_ZONE_ID) must beFalse
Copy link
Member

@mkurz mkurz Mar 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is wrong. It tests for WRITE_DATES_WITH_ZONE_ID but WRITE_DURATIONS_AS_TIMESTAMPS is configured. Makes no sense. No matter if I set WRITE_DURATIONS_AS_TIMESTAMPS to true or false (like here) the test always passes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to Akka 2.6's Jackson serializer
3 participants