Class JsonMetadata
- java.lang.Object
- 
- org.apache.tika.metadata.serialization.JsonMetadata
 
- 
 public class JsonMetadata extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description JsonMetadata()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static MetadatafromJson(Reader reader)Read metadata from reader.static MetadatareadMetadataObject(com.fasterxml.jackson.core.JsonParser jParser)expects that jParser has not yet started on object or for jParser to be pointing to the start object.static voidsetPrettyPrinting(boolean prettyPrint)static voidtoJson(Metadata metadata, Writer writer)Serializes a Metadata object to Json.
 
- 
- 
- 
Method Detail- 
toJsonpublic static void toJson(Metadata metadata, Writer writer) throws IOException Serializes a Metadata object to Json. This does not flush or close the writer.- Parameters:
- metadata- metadata to write
- writer- writer
- Throws:
- TikaException- if there is an IOException during writing
- IOException
 
 - 
fromJsonpublic static Metadata fromJson(Reader reader) throws IOException Read metadata from reader.This does not close the reader. - Parameters:
- reader- reader to read from
- Returns:
- Metadata or null if nothing could be read from the reader
- Throws:
- IOException- in case of parse failure or IO failure with Reader
 
 - 
readMetadataObjectpublic static Metadata readMetadataObject(com.fasterxml.jackson.core.JsonParser jParser) throws IOException expects that jParser has not yet started on object or for jParser to be pointing to the start object.- Parameters:
- jParser-
- Returns:
- Throws:
- IOException
 
 - 
setPrettyPrintingpublic static void setPrettyPrinting(boolean prettyPrint) 
 
- 
 
-