Class XmlJsonMarshaller

java.lang.Object
org.ikasan.marshaller.xml.XmlJsonMarshaller
All Implemented Interfaces:
ConfiguredSerialiser<net.sf.json.xml.XMLSerializer>
Direct Known Subclasses:
XmlFileJsonMarshaller, XmlFilePathnameJsonMarshaller, XmlInputStreamJsonMarshaller, XmlStringJsonMarshaller

public abstract class XmlJsonMarshaller extends Object implements ConfiguredSerialiser<net.sf.json.xml.XMLSerializer>
Abstract class supporting the marshalling of XML to/from JSON.
Author:
Ikasan Development Team.
  • Field Details

    • xmlSerialiser

      protected net.sf.json.xml.XMLSerializer xmlSerialiser
      thread-safe serialiser instance
    • encoding

      protected String encoding
      marshaller encoding
  • Constructor Details

    • XmlJsonMarshaller

      public XmlJsonMarshaller(net.sf.json.xml.XMLSerializer xmlSerialiser)
      Constructor
      Parameters:
      xmlSerialiser -
  • Method Details

    • unmarshall

      public String unmarshall(net.sf.json.JSON json)
      Unmarshall the incoming JSON instance into an XML string. If encoding is set on this class then that is applied when generating the resulting XML.
      Parameters:
      json -
      Returns:
    • setSerialiser

      public void setSerialiser(net.sf.json.xml.XMLSerializer xmlSerialiser)
      Description copied from interface: ConfiguredSerialiser
      Set the serialiser on an implementing class
      Specified by:
      setSerialiser in interface ConfiguredSerialiser<net.sf.json.xml.XMLSerializer>
    • getSerialiser

      public net.sf.json.xml.XMLSerializer getSerialiser()
      Description copied from interface: ConfiguredSerialiser
      Get the serialiser on an implementing class
      Specified by:
      getSerialiser in interface ConfiguredSerialiser<net.sf.json.xml.XMLSerializer>
      Returns:
      serialiser
    • getEncoding

      public String getEncoding()
    • setEncoding

      public void setEncoding(String encoding)