@ComponentProfile(summary="JSON/XML Transformation driver, supports a top level JSON Object", since="3.0.4", tag="json,xml,transformation") public class JsonObjectTransformationDriver extends JsonlibTransformationDriver
JSONObject.fromObject(Object)
to read the JSON payload.JsonlibTransformationDriver
In the adapter configuration file this class is aliased as json-object-transformation-driver which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
JsonObjectTransformationDriver() |
Modifier and Type | Method and Description |
---|---|
protected net.sf.json.JSON |
parse(java.lang.String input)
Parse a JSON object from a string.
|
parseArray, parseObject
getArrayName, getElementName, getForceTopLevelObject, getObjectName, getRootName, getSkipWhitespace, getTrimSpaces, getTypeHintsCompatibility, getTypeHintsEnabled, objectName, setArrayName, setElementName, setForceTopLevelObject, setObjectName, setRootName, setSkipWhitespace, setTrimSpaces, setTypeHintsCompatibility, setTypeHintsEnabled, transform, xmlToJSON
protected net.sf.json.JSON parse(java.lang.String input) throws net.sf.json.JSONException
parse
in class JsonlibTransformationDriver
input
- The JSON string.net.sf.json.JSONException
- Thrown if the string isn't a valid JSON object.