Hello folks,

We have a use case where we are trying to convert the JSON field value with 
lower capitalization to an enum with its name capitalized. 

Consider the following example:
Input string:
{
    "id": "1",
    "status": "joined"
}

and the POJO class:
@Jacksonized
public class Member {
    String id;
    MemberStatus status;
}

public enum MemberStatus {
    JOINED;
    DEACTIVATED;
}

With this use case in mind, we opt-ed to annotate the *status* field of 
*Member* class with 
@JsonFormat(with=JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_VALUES)

However, we find out instead of ACCEPT_CASE_INSENSITIVE_VALUES, the 
ACCEPT_CASE_INSENSITIVE_PROPERTIES format is the one that sets the 
*caseInsensitive 
*of *EnumDeserializer* to true. 

Based on the documentation, the ACCEPT_CASE_INSENSITIVE_PROPERTIES should 
"allows case-insensitive matching of property names (but NOT values, see 
ACCEPT_CASE_INSENSITIVE_VALUES 
<https://www.javadoc.io/static/com.fasterxml.jackson.core/jackson-annotations/2.14.1/com/fasterxml/jackson/annotation/JsonFormat.Feature.html#ACCEPT_CASE_INSENSITIVE_VALUES>
 for 
that)." But the behavior seems to be the totally opposite of what's being 
described in the documentation.

Am I missing something here?

Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/c9ac4c33-658f-4a67-8ed4-551aa7ae0950n%40googlegroups.com.

Reply via email to