Emil Kantis
03/27/2023, 1:30 PMsdeleuze
03/27/2023, 1:31 PMsdeleuze
03/27/2023, 1:31 PMEmil Kantis
03/27/2023, 1:37 PMapi
):
@Serializable // from kotlinx.serialization
data class RaceDay(
val eventCode: EventCode,
val date: LocalDateAsString, // type-alias configuring LocalDate to use a specific serializer
)
Controller method from different gradle module `app`:
@GetMapping("/link")
@LogStackCoroutine
suspend fun getActiveLinks(): ResponseEntity<List<RaceDay>> =
ResponseEntity.ok(orchestrator.activeLinks())
response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 49
[
{
"date": "1970-03-11",
"eventCode-U8HkqSU": "PEW"
}
]
Emil Kantis
03/27/2023, 1:37 PMorg.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0
Emil Kantis
03/27/2023, 1:39 PM-U8HkqSU
which I believe comes from jackson trying to serialize a value class.
``````sdeleuze
03/27/2023, 1:42 PMResponseEntity
or to https://github.com/Kotlin/kotlinx.serialization/issues/2060. Could you please try with/without suspending and with/without ResponseEntity
and let me know the 4 results?Emil Kantis
03/27/2023, 1:46 PMEmil Kantis
03/27/2023, 1:53 PMsdeleuze
03/27/2023, 1:55 PMEmil Kantis
03/27/2023, 1:56 PMsdeleuze
03/27/2023, 1:56 PMEmil Kantis
03/27/2023, 5:21 PMsdeleuze
03/28/2023, 8:37 AMAbstractMessageWriterResultHandler#writeBody
for those use cases with a confusion between leveraging bodyParameter
versus actualParam
. Could you please create an issue in https://github.com/spring-projects/spring-framework/issues pinging me (@sdeleuze
) and linking your repro?Emil Kantis
03/28/2023, 8:51 AMEmil Kantis
03/29/2023, 1:04 PMsdeleuze
03/30/2023, 4:38 PM2.7.11
and 3.0.6
. If you can test to confirm it works (when CI builds will be done) with snapshots that would be great.Emil Kantis
03/30/2023, 4:41 PMEmil Kantis
03/30/2023, 4:55 PM