public abstract class AbstractJsonTransformer extends java.lang.Object implements IDataTransformer
AbstractJsonTransformer
provides some basic
functionalities to transform a JSONObject
or JSON String into an
IEntity
.
Having an IEntity
in EML with a JsonProperty
annotation
will result in a specific JSON transformer, as a subclass of
AbstractJsonTransformer
. The annotated JsonProperty
's will then be taken into account for the transformation.
TYPE_BOOLEAN, TYPE_DATE, TYPE_ENTITY, TYPE_IMAGE, TYPE_LONG, TYPE_NONE, TYPE_STRING
Constructor and Description |
---|
AbstractJsonTransformer() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
transform(java.lang.Object object,
int intoType)
Transforms the given
JSONObject or JSON String into an
IEntity . |
public java.lang.Object transform(java.lang.Object object, int intoType)
JSONObject
or JSON String into an
IEntity
. The concrete type of entity is defined and created by
createEntity()
.transform
in interface IDataTransformer
object
- the object to be transformedintoType
- is not taken into account as the transformed type is fixed to
IDataTransformer.TYPE_ENTITY
IEntity
based on the given object