Deserializing an enum with Jackson

后端 未结 6 965
孤城傲影
孤城傲影 2020-12-02 16:35

I\'m trying and failing to deserialize an enum with Jackson 2.5.4, and I don\'t quite see my case out there. My input strings are camel case, and I want to simply map to sta

6条回答
  •  难免孤独
    2020-12-02 16:58

    You could use @JsonCreator annotation to resolve your problem. Take a look at https://www.baeldung.com/jackson-serialize-enums, there's clear enough explanation about enum and serialize-deserialize with jackson lib.

提交回复
热议问题