com.fasterxml.jackson.databind
Class PropertyNamingStrategy.PascalCaseStrategy

java.lang.Object
  extended by com.fasterxml.jackson.databind.PropertyNamingStrategy
      extended by com.fasterxml.jackson.databind.PropertyNamingStrategy.PropertyNamingStrategyBase
          extended by com.fasterxml.jackson.databind.PropertyNamingStrategy.PascalCaseStrategy
Enclosing class:
PropertyNamingStrategy

public static class PropertyNamingStrategy.PascalCaseStrategy
extends PropertyNamingStrategy.PropertyNamingStrategyBase

A PropertyNamingStrategy that translates typical camelCase Java property names to PascalCase JSON element names (i.e., with a capital first letter). In particular, the following translations are applied by this PropertyNamingStrategy.

This rules result in the following example translation from Java property names to JSON element names.

Since:
2.1

Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.PropertyNamingStrategy
PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy, PropertyNamingStrategy.PascalCaseStrategy, PropertyNamingStrategy.PropertyNamingStrategyBase
 
Field Summary
 
Fields inherited from class com.fasterxml.jackson.databind.PropertyNamingStrategy
CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES, PASCAL_CASE_TO_CAMEL_CASE
 
Constructor Summary
PropertyNamingStrategy.PascalCaseStrategy()
           
 
Method Summary
 String translate(String input)
          Converts camelCase to PascalCase For example, "userName" would be converted to "UserName".
 
Methods inherited from class com.fasterxml.jackson.databind.PropertyNamingStrategy.PropertyNamingStrategyBase
nameForConstructorParameter, nameForField, nameForGetterMethod, nameForSetterMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyNamingStrategy.PascalCaseStrategy

public PropertyNamingStrategy.PascalCaseStrategy()
Method Detail

translate

public String translate(String input)
Converts camelCase to PascalCase For example, "userName" would be converted to "UserName".

Specified by:
translate in class PropertyNamingStrategy.PropertyNamingStrategyBase
Parameters:
input - formatted as camelCase string
Returns:
input converted to PascalCase format


Copyright © 2012 FasterXML. All Rights Reserved.