Package com.ibm.cloud.sdk.core.util
Class GsonSerializationHelper
- java.lang.Object
-
- com.ibm.cloud.sdk.core.util.GsonSerializationHelper
-
@Deprecated public class GsonSerializationHelper extends java.lang.Object
Deprecated.This class should no longer be needed once users upgrade to a recent version of the package that contains the new DynamicModel pattern.Utility class to help with serialization in models which extendDynamicModel
.- See Also:
DynamicModel
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> T
serializeDynamicModelProperty(java.lang.Object property, java.lang.reflect.Type type)
Deprecated.Takes a property of an object extendingDynamicModel
and serializes it to the desired type.
-
-
-
Method Detail
-
serializeDynamicModelProperty
public static <T> T serializeDynamicModelProperty(java.lang.Object property, java.lang.reflect.Type type)
Deprecated.Takes a property of an object extendingDynamicModel
and serializes it to the desired type. Without this conversion, properties which also happen to extendDynamicModel
throw an exception when trying to cast to their concrete type from the default Gson serialization.- Type Parameters:
T
- the generic type- Parameters:
property
- property of a DynamicModeltype
- the type we wish to convert the property to- Returns:
- the properly converted object
-
-