Package org.apache.uima.json
Class JsonMetaDataSerializer
- java.lang.Object
-
- org.apache.uima.json.JsonMetaDataSerializer
-
public class JsonMetaDataSerializer extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description JsonMetaDataSerializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidtoJSON(XMLizable object, com.fasterxml.jackson.core.JsonGenerator jg, boolean isFormattedOutput)Serialize use a specific instance of a JsonGenerator which encapsulates where the output goesstatic voidtoJSON(XMLizable object, java.io.File file)static voidtoJSON(XMLizable object, java.io.File file, boolean isFormattedOutput)static voidtoJSON(XMLizable object, java.io.OutputStream aOutputStream)Writes out this object's JSON representation.static voidtoJSON(XMLizable object, java.io.OutputStream aOutputStream, boolean isFormattedOutput)static voidtoJSON(XMLizable object, java.io.Writer aWriter)Serialize to a writerstatic voidtoJSON(XMLizable object, java.io.Writer aWriter, boolean isFormattedOutput)Serialize to a writer
-
-
-
Method Detail
-
toJSON
public static void toJSON(XMLizable object, java.io.Writer aWriter) throws org.xml.sax.SAXException
Serialize to a writer- Parameters:
object- - the instance of an XMLizable to serializeaWriter- - where the output goes- Throws:
org.xml.sax.SAXException- - wrapping an IOException, probably
-
toJSON
public static void toJSON(XMLizable object, java.io.Writer aWriter, boolean isFormattedOutput) throws org.xml.sax.SAXException
Serialize to a writer- Parameters:
object- - the instance of an XMLizable to serializeaWriter- - where the output goesisFormattedOutput- true for pretty printing- Throws:
org.xml.sax.SAXException- - wrapping an IOException, probably
-
toJSON
public static void toJSON(XMLizable object, com.fasterxml.jackson.core.JsonGenerator jg, boolean isFormattedOutput) throws org.xml.sax.SAXException
Serialize use a specific instance of a JsonGenerator which encapsulates where the output goes- Parameters:
object- - the instance of an XMLizable to serializejg- the generator to useisFormattedOutput- true for pretty printing- Throws:
org.xml.sax.SAXException- - wrapping an IOException, probably
-
toJSON
public static void toJSON(XMLizable object, java.io.OutputStream aOutputStream) throws org.xml.sax.SAXException
Writes out this object's JSON representation.- Parameters:
object- - the instance of an XMLizable to serializeaOutputStream- an OutputStream to which the JSON will be written- Throws:
org.xml.sax.SAXException- - wrapping an IOException, probably
-
toJSON
public static void toJSON(XMLizable object, java.io.OutputStream aOutputStream, boolean isFormattedOutput) throws org.xml.sax.SAXException
- Parameters:
object- - the instance of an XMLizable to serializeaOutputStream- an OutputStream to which the JSON will be writtenisFormattedOutput- true for pretty printing- Throws:
org.xml.sax.SAXException- - wrapping an IOException, probably
-
toJSON
public static void toJSON(XMLizable object, java.io.File file) throws org.xml.sax.SAXException
- Parameters:
object- - the instance of an XMLizable to serializefile- where the output goes- Throws:
org.xml.sax.SAXException- - wrapping an IOException, probably
-
toJSON
public static void toJSON(XMLizable object, java.io.File file, boolean isFormattedOutput) throws org.xml.sax.SAXException
- Parameters:
object- - the instance of an XMLizable to serializefile- where the output goesisFormattedOutput- true for pretty printing- Throws:
org.xml.sax.SAXException- - wrapping an IOException, probably
-
-