Class SafeJsonTransformationDriver

  • All Implemented Interfaces:
    TransformationDriver

    @ComponentProfile(summary="JSON/XML Transformation driver that strips spaces before rendering as JSON",
                      since="3.6.4",
                      tag="json,xml,transformation")
    public class SafeJsonTransformationDriver
    extends JsonlibTransformationDriver
    Executes a transform to strip-spaces before rendering as JSON.

    This will execute a transform to strip spaces using the standard xsl:strip-space elements="*" directive before attempting to serialize the XML as JSON. In some situations the default driver can be very sensitive to whitespace that may occur because of indenting and formatting.

    The transform used is stored in the jar file itself - "META-INF/com.adaptris.core.transform.json.strip-spaces.xsl"; it is very simple, and may not handle namespaces terribly well.

    Since:
    3.6.4

    In the adapter configuration file this class is aliased as json-safe-transformation-driver which is the preferred alternative to the fully qualified classname when building your configuration.

    • Field Detail

      • STRIP_SPACES_XSLT

        public static final java.lang.String STRIP_SPACES_XSLT
        See Also:
        Constant Field Values
    • Constructor Detail

      • SafeJsonTransformationDriver

        public SafeJsonTransformationDriver()