micronaut-projects / micronaut-serialization

Build Time Serialization APIs for Micronaut
Apache License 2.0
26 stars 18 forks source link

Jackson Serialization doesn't work on java.time #921

Open SZanko opened 2 months ago

SZanko commented 2 months ago

Expected Behavior

Micronaut does serialize ExampleDto correctly with values from request

Actual Behaviour

An instance of ExampleDto is created but the values of the field is null

logs:

Received Tour: null, Duration: null

Steps To Reproduce

  1. gradle run
  2. run
    curl -X POST http://localhost:8080/example \
    -H "Content-Type: application/json" \
    -d '{
    "name": "City Tour",
    "duration": "PT2H30M"
    }'

Environment Information

Example Application

https://github.com/SZanko/MicronautJavaTimeSerializationTest

Version

4.6.0

dstepanov commented 2 months ago

Please include a test in your project that reproduces the problem