diff --git a/src/main/java/cokr/xit/foundation/data/JSON.java b/src/main/java/cokr/xit/foundation/data/JSON.java index 963a957..d5cec8f 100644 --- a/src/main/java/cokr/xit/foundation/data/JSON.java +++ b/src/main/java/cokr/xit/foundation/data/JSON.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; +import com.fasterxml.jackson.databind.PropertyNamingStrategy; import com.fasterxml.jackson.databind.ser.FilterProvider; import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter; import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider; @@ -203,4 +204,16 @@ public class JSON extends AbstractComponent { NONE } } + + /**대문자 이름으로 된 프로퍼티를 읽고 쓸 때 사용 + * @author mjkhan + */ + public static class PropertiesInUpperCase extends PropertyNamingStrategy.PropertyNamingStrategyBase { + private static final long serialVersionUID = 1L; + + @Override + public String translate(String propertyName) { + return propertyName.toUpperCase(); + } + } } \ No newline at end of file