public static class PropertyNamingStrategies.SnakeCaseStrategy extends PropertyNamingStrategies.NamingBase
PropertyNamingStrategy
that translates typical camel case Java
property names to lower case JSON element names, separated by
underscores. This implementation is somewhat lenient, in that it
provides some additional translations beyond strictly translating from
camel case only. In particular, the following translations are applied
by this PropertyNamingStrategy.
These rules result in the following additional example translations from Java property names to JSON element names.
PropertyNamingStrategy.KebabCaseStrategy, PropertyNamingStrategy.LowerCaseStrategy, PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy, PropertyNamingStrategy.LowerDotCaseStrategy, PropertyNamingStrategy.PascalCaseStrategy, PropertyNamingStrategy.PropertyNamingStrategyBase, PropertyNamingStrategy.SnakeCaseStrategy, PropertyNamingStrategy.UpperCamelCaseStrategy
CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES, KEBAB_CASE, LOWER_CAMEL_CASE, LOWER_CASE, LOWER_DOT_CASE, PASCAL_CASE_TO_CAMEL_CASE, SNAKE_CASE, UPPER_CAMEL_CASE
Constructor and Description |
---|
SnakeCaseStrategy() |
Modifier and Type | Method and Description |
---|---|
String |
translate(String input) |
nameForConstructorParameter, nameForField, nameForGetterMethod, nameForSetterMethod, translateLowerCaseWithSeparator
public String translate(String input)
translate
in class PropertyNamingStrategies.NamingBase
Copyright © 2008–2024 FasterXML. All rights reserved.