I am using Java 21, and trying to convert a String from a REST response to a record. However, I am getting an error:
org.testcontainers.shaded.com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.myapp.model.MyRecord: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)
I know it will work when I add:
@JsonProperty("...")
for every field, but is there any way to convert the String with ObjectMapper without having to add the @JsonProperty annotation?