Package com.adaptris.core.transform.json
Class JsonArrayTransformationDriver
- java.lang.Object
-
- com.adaptris.core.transform.json.JsonTransformationDriverImpl
-
- com.adaptris.core.transform.json.JsonlibTransformationDriver
-
- com.adaptris.core.transform.json.JsonArrayTransformationDriver
-
- All Implemented Interfaces:
TransformationDriver
@ComponentProfile(summary="JSON/XML Transformation driver, supports top level JSON arrays", since="3.0.4", tag="json,xml,transformation") public class JsonArrayTransformationDriver extends JsonlibTransformationDriver
Transformation driver that usesJSONArray.fromObject(Object)
instead ofJSONObject.fromObject(Object)
.- Since:
- 3.0.4
- See Also:
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 Summary
Constructors Constructor Description JsonArrayTransformationDriver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected net.sf.json.JSONArray
parse(java.lang.String input)
Parse a JSON array from a string.-
Methods inherited from class com.adaptris.core.transform.json.JsonlibTransformationDriver
parseArray, parseObject
-
Methods inherited from class com.adaptris.core.transform.json.JsonTransformationDriverImpl
getArrayName, getElementName, getForceTopLevelObject, getObjectName, getRootName, getSkipWhitespace, getTrimSpaces, getTypeHintsCompatibility, getTypeHintsEnabled, objectName, setArrayName, setElementName, setForceTopLevelObject, setObjectName, setRootName, setSkipWhitespace, setTrimSpaces, setTypeHintsCompatibility, setTypeHintsEnabled, transform, xmlToJSON
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.transform.json.TransformationDriver
transform
-
-
-
-
Method Detail
-
parse
protected net.sf.json.JSONArray parse(java.lang.String input) throws net.sf.json.JSONException
Parse a JSON array from a string.- Overrides:
parse
in classJsonlibTransformationDriver
- Parameters:
input
- The JSON string.- Returns:
- The JSON array.
- Throws:
net.sf.json.JSONException
- Thrown if the string isn't a valid JSON array.
-
-