Class JsonMetaDataSerializer

java.lang.Object
org.apache.uima.json.JsonMetaDataSerializer

public class JsonMetaDataSerializer extends Object
  • Constructor Details

    • JsonMetaDataSerializer

      public JsonMetaDataSerializer()
  • Method Details

    • toJSON

      public static void toJSON(XMLizable object, Writer aWriter) throws SAXException
      Serialize to a writer
      Parameters:
      object - - the instance of an XMLizable to serialize
      aWriter - - where the output goes
      Throws:
      SAXException - - wrapping an IOException, probably
    • toJSON

      public static void toJSON(XMLizable object, Writer aWriter, boolean isFormattedOutput) throws SAXException
      Serialize to a writer
      Parameters:
      object - - the instance of an XMLizable to serialize
      aWriter - - where the output goes
      isFormattedOutput - true for pretty printing
      Throws:
      SAXException - - wrapping an IOException, probably
    • toJSON

      public static void toJSON(XMLizable object, com.fasterxml.jackson.core.JsonGenerator jg, boolean isFormattedOutput) throws SAXException
      Serialize use a specific instance of a JsonGenerator which encapsulates where the output goes
      Parameters:
      object - - the instance of an XMLizable to serialize
      jg - the generator to use
      isFormattedOutput - true for pretty printing
      Throws:
      SAXException - - wrapping an IOException, probably
    • toJSON

      public static void toJSON(XMLizable object, OutputStream aOutputStream) throws SAXException
      Writes out this object's JSON representation.
      Parameters:
      object - - the instance of an XMLizable to serialize
      aOutputStream - an OutputStream to which the JSON will be written
      Throws:
      SAXException - - wrapping an IOException, probably
    • toJSON

      public static void toJSON(XMLizable object, OutputStream aOutputStream, boolean isFormattedOutput) throws SAXException
      Parameters:
      object - - the instance of an XMLizable to serialize
      aOutputStream - an OutputStream to which the JSON will be written
      isFormattedOutput - true for pretty printing
      Throws:
      SAXException - - wrapping an IOException, probably
    • toJSON

      public static void toJSON(XMLizable object, File file) throws SAXException
      Parameters:
      object - - the instance of an XMLizable to serialize
      file - where the output goes
      Throws:
      SAXException - - wrapping an IOException, probably
    • toJSON

      public static void toJSON(XMLizable object, File file, boolean isFormattedOutput) throws SAXException
      Parameters:
      object - - the instance of an XMLizable to serialize
      file - where the output goes
      isFormattedOutput - true for pretty printing
      Throws:
      SAXException - - wrapping an IOException, probably