Why does Jackson 2 not recognize the first capital letter if the leading camel case word is only a single letter long?

后端 未结 5 1801
自闭症患者
自闭症患者 2020-12-04 14:16

I\'m using Spring 4 MVC with Jackson 2 for my service. For one of the operations I have a request object that has an attribute where the leading camel case word this is only

5条回答
  •  春和景丽
    2020-12-04 15:08

    My understanding is that Jackson uses by default its own naming convention, which is very close, but not exactly the same, to the Java Bean naming convention. A MapperFeature option, MapperFeature.USE_STD_BEAN_NAMING, was added in Jackson 2.5.0 to tell Jackson to use the Java Bean naming convention -- see Jackson Issue 653. For backward compatibility, the default value for MapperFeature.USE_STD_BEAN_NAMING is false.

提交回复
热议问题