jsonlib-transformation-driver
since its performance is not predictable
enough for it to be the default.@ComponentProfile(summary="JSON/XML Transformation driver, supports top level JSON arrays", tag="json,xml,transformation") @Deprecated @Removal(version="3.12.0", message="since 3.10.0, the name was changed to jsonlib-transformation-driver since its performance is not predictable enough for it to be the default.") public class DefaultJsonTransformationDriver extends JsonlibTransformationDriver
JSONObject.fromObject(Object)
and JSONArray.fromObject(Object)
to
parse the input.
In some processing scenarios, this driver is inherently CPU bound because of how it processes XML elements. As a
result it is no longer the suggested default. In most use-cases you can use SimpleJsonTransformationDriver
instead. If
you require the specific features of this driver, then use JsonlibTransformationDriver
instead.
This uses the net.sf.json
package, which in some situations, can be very sensitive to whitespace, and output may not be
as you expect. Accordingly, when you are generating the XML to be rendered as JSON make sure that you use
xsl:strip-space elements="*"
.
In the adapter configuration file this class is aliased as default-transformation-driver which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
DefaultJsonTransformationDriver()
Deprecated.
|
parse, parseArray, parseObject
getArrayName, getElementName, getForceTopLevelObject, getObjectName, getRootName, getSkipWhitespace, getTrimSpaces, getTypeHintsCompatibility, getTypeHintsEnabled, objectName, setArrayName, setElementName, setForceTopLevelObject, setObjectName, setRootName, setSkipWhitespace, setTrimSpaces, setTypeHintsCompatibility, setTypeHintsEnabled, transform, xmlToJSON