Package org.apache.tika.serialization
Class TikaJsonSerializer
- java.lang.Object
- 
- org.apache.tika.serialization.TikaJsonSerializer
 
- 
 public class TikaJsonSerializer extends Object This is a basic serializer that requires that an object: a) have a no-arg constructor b) have both setters and getters for the same parameters with the same names, e.g. setXYZ and getXYZ c) setters and getters have to follow the pattern setX where x is a capital letter d) have maps as parameters where the keys are strings (and the values are strings for now) e) at deserialization time, objects that have setters for enums also have to have a setter for a string value of that enum
- 
- 
Field SummaryFields Modifier and Type Field Description static StringINSTANTIATED_CLASS_KEYstatic StringSUPER_CLASS_KEY
 - 
Constructor SummaryConstructors Constructor Description TikaJsonSerializer()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidserialize(Object obj, com.fasterxml.jackson.core.JsonGenerator jsonGenerator)static voidserialize(String fieldName, Object obj, Class superClass, com.fasterxml.jackson.core.JsonGenerator jsonGenerator)static voidserializeObject(String fieldName, Object obj, Class superClass, com.fasterxml.jackson.core.JsonGenerator jsonGenerator)
 
- 
- 
- 
Method Detail- 
serializepublic static void serialize(Object obj, com.fasterxml.jackson.core.JsonGenerator jsonGenerator) throws TikaSerializationException, IOException 
 - 
serializepublic static void serialize(String fieldName, Object obj, Class superClass, com.fasterxml.jackson.core.JsonGenerator jsonGenerator) throws TikaSerializationException, IOException 
 - 
serializeObjectpublic static void serializeObject(String fieldName, Object obj, Class superClass, com.fasterxml.jackson.core.JsonGenerator jsonGenerator) throws TikaSerializationException - Parameters:
- fieldName- can be null -- used only for logging and debugging
- obj-
- superClass-
- jsonGenerator-
- Throws:
- TikaSerializationException
 
 
- 
 
-