Package org.apache.uima.json
Class JsonMetaDataSerializer
java.lang.Object
org.apache.uima.json.JsonMetaDataSerializer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Serialize use a specific instance of a JsonGenerator which encapsulates where the output goesstatic void
static void
static void
toJSON
(XMLizable object, OutputStream aOutputStream) Writes out this object's JSON representation.static void
toJSON
(XMLizable object, OutputStream aOutputStream, boolean isFormattedOutput) static void
Serialize to a writerstatic void
Serialize to a writer
-
Constructor Details
-
JsonMetaDataSerializer
public JsonMetaDataSerializer()
-
-
Method Details
-
toJSON
Serialize to a writer- Parameters:
object
- - the instance of an XMLizable to serializeaWriter
- - 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 serializeaWriter
- - where the output goesisFormattedOutput
- 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 serializejg
- the generator to useisFormattedOutput
- true for pretty printing- Throws:
SAXException
- - wrapping an IOException, probably
-
toJSON
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:
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 serializeaOutputStream
- an OutputStream to which the JSON will be writtenisFormattedOutput
- true for pretty printing- Throws:
SAXException
- - wrapping an IOException, probably
-
toJSON
- Parameters:
object
- - the instance of an XMLizable to serializefile
- 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 serializefile
- where the output goesisFormattedOutput
- true for pretty printing- Throws:
SAXException
- - wrapping an IOException, probably
-