[TS] PropertyNamingStrategy deprecated. (since 2.12)

2023. 3. 24. 17:26JAVA & Kotiln/etc.

https://stackoverflow.com/questions/74714449/alternatives-for-propertynamingstrategy-snake-case-or-propertynamingstrategy-sna

 

Alternatives for PropertyNamingStrategy.SNAKE_CASE or PropertyNamingStrategy.SnakeCaseStrategy as it is deprecated now

In prior versions of jackson, we were using the following two ways to modify the Property Naming during serialization and deserialization of objects. First way: Mentioning the following annotation on

stackoverflow.com

 

https://fasterxml.github.io/jackson-databind/javadoc/2.13/com/fasterxml/jackson/databind/PropertyNamingStrategies.html

 

PropertyNamingStrategies (jackson-databind 2.13.0 API)

Naming convention used in Java, where words other than first are capitalized and no separator is used between words. Since this is the native Java naming convention, naming strategy will not do any transformation between names in data (JSON) and POJOS. Exa

fasterxml.github.io

 

Using

  'PropertyNamingStrategies' instead of  'PropertyNamingStrategy'

 

if u wanna use with '@JsonNaming' annotation follow below. (ex. LowerCase)

@JsonNaming(PropertyNamingStrategies.LowerCaseStrategy.class)

orElse...?

PropertyNamingStrategy pns = PropertyNamingStrategies.LOWER_CASE;

 

'JAVA & Kotiln > etc.' 카테고리의 다른 글

면접 관련 질문 리스트  (0) 2023.01.30