@ComponentProfile(summary="JSON/XML Transformation driver, supports top level JSON arrays", since="3.0.4", tag="json,xml,transformation") public class JsonArrayTransformationDriver extends JsonlibTransformationDriver
JSONArray.fromObject(Object)
instead of JSONObject.fromObject(Object)
.JsonlibTransformationDriver
In the adapter configuration file this class is aliased as json-array-transformation-driver which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
JsonArrayTransformationDriver() |
Modifier and Type | Method and Description |
---|---|
protected net.sf.json.JSONArray |
parse(java.lang.String input)
Parse a JSON array 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.JSONArray 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 array.