I am adding an endpoint to an app, which receives a json and in spring this is automatically converted to a DTO I created. Many fields can be null, which I set in Kotlin with question mark and it is not a problem when the value is missing in the json, but the problem is when there is explictly "null".
JSON parse error: Null value for creator property 'trial_period' (index 6);
DeserializationFeature.FAIL_ON_NULL_CREATOR_PROPERTIESenabled"
It has been set for some reason in application.yml
jackson:
deserialization:
fail-on-null-creator-properties: true
so I do not want to change it globally, but I need to disable it for this endpoint. How can I do it?
Thank you.
One option is put anotation in your DTO.