Regression since 2.12.1 if class has attributes with names xxx and xxx-yyy
- Error :Conflicting getter definitions for property
#678
Labels
xxx-yyy
- Error :Conflicting getter definitions for property
#678
Describe the bug
Hi, since the version 2.12.1 (don't have the problem in version 2.12.0), I have a problem to serialize a data class with this structure (see below).
I have see error :
Conflicting getter definitions for property "content": Export#getContent() vs Export#getContent-Type() com.fasterxml.jackson.databind.JsonMappingException: Conflicting getter definitions for property "content": Export#getContent() vs Export#getContent-Type() at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:288) at com.fasterxml.jackson.databind.SerializerProvider.reportMappingProblem(SerializerProvider.java:1308)
So I made some test and I if rename the attribut
Content-Type
without the "-" ("ContentType") orContent2-Type
, I don't have any problem.Why I have this problem ? The regression is that normal ? How can I fix that ? (without rename my attributes)
Thanks
To Reproduce
Expected behavior
{"filename":"...", "content":"...", "Content-Type":"..."}
Versions
Kotlin:1.6.21
Jackson-module-kotlin: 2.12.1
Jackson-databind: 2.12.1
The text was updated successfully, but these errors were encountered: