JSON default serializers for date/datetime differ javadsl to scaladsl
See original GitHub issueDefault JSON serializers for Lagom’s javadsl and scaladsl use different format when serializing java.time.Instant
(this potentially impacts other date/datetime related classes).
online-auction-scala
serializes bidTime
in Bid
instances using string/rfc3339
format.
online-auction-java
serializes bidTime
in Bid
instances using a float representing seconds since epoch (with at least 2 decimals, maybe more?).
This issue is not to discuss what is the most appropriate format for each class in java.time
but to settle and document the behavior of the default json serializers. Since each API uses a different underlying implementation (“jackson with JavaTimeModule
” vs play-json) using differnt formats for same types could block interop between LagomJava and LagomScala.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
I think we should change the Jackson configuration to use RFC3339 - Swagger uses this, and I think it tends to be pretty standard across the web to use it. We should of course make it configurable, and not do it until a major release, documenting it in the migration guide.
This is fixed in #1955