Class 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 uses JSONArray.fromObject(Object) instead of JSONObject.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 Detail

      • JsonArrayTransformationDriver

        public JsonArrayTransformationDriver()
    • 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 class JsonlibTransformationDriver
        Parameters:
        input - The JSON string.
        Returns:
        The JSON array.
        Throws:
        net.sf.json.JSONException - Thrown if the string isn't a valid JSON array.