public class SuperObjectToJsonTypeConverter extends AbstractObjectToJsonTypeConverter<Object>
classesWhichCanResolved| Constructor and Description |
|---|
SuperObjectToJsonTypeConverter() |
| Modifier and Type | Method and Description |
|---|---|
static AbstractJsonType |
convertFromObjectToJson(Object propertyValue,
String propertyKey)
It convert to implementation of AbstractJsonType through use of json for conversion from java object to raw json, then raw json convert to
com.google.gson.JsonElement, and this JsonElement to instance of AbstractJsonType (json object, array json, or simple text json)
|
Optional<AbstractJsonType> |
convertToJsonTypeOrEmpty(PrimitiveJsonTypesResolver primitiveJsonTypesResolver,
Object propertyValue,
String propertyKey)
It return instance of ArrayJsonType or ObjectJsonType if propertyValue is not one of above types then will convert it to gson JsonElement instance and
then convert to ArrayJsonType, ObjectJsonType, StringJsonType
|
getClassesWhichCanResolveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreturnOptionalJsonTyperesolveTypeOfResolverpublic static AbstractJsonType convertFromObjectToJson(Object propertyValue, String propertyKey)
propertyValue - java bean to convert to instance of AbstractJsonType.propertyKey - currently processed propertyKey from properties.public Optional<AbstractJsonType> convertToJsonTypeOrEmpty(PrimitiveJsonTypesResolver primitiveJsonTypesResolver, Object propertyValue, String propertyKey)
primitiveJsonTypesResolver - resolver which is main resolver for leaf value from propertypropertyValue - property key.propertyKey - currently processing property keyCopyright © 2022. All rights reserved.