public class JsonMetadata extends Object
| Constructor and Description |
|---|
JsonMetadata() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.tika.metadata.Metadata |
fromJson(Reader reader)
Read metadata from reader.
|
static org.apache.tika.metadata.Metadata |
readMetadataObject(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 void |
setPrettyPrinting(boolean prettyPrint) |
static void |
toJson(org.apache.tika.metadata.Metadata metadata,
Writer writer)
Serializes a Metadata object to Json.
|
public static void toJson(org.apache.tika.metadata.Metadata metadata,
Writer writer)
throws IOException
metadata - metadata to writewriter - writerorg.apache.tika.exception.TikaException - if there is an IOException during writingIOExceptionpublic static org.apache.tika.metadata.Metadata fromJson(Reader reader) throws IOException
This does not close the reader.
reader - reader to read fromIOException - in case of parse failure or IO failure with Readerpublic static org.apache.tika.metadata.Metadata readMetadataObject(com.fasterxml.jackson.core.JsonParser jParser)
throws IOException
jParser - IOExceptionpublic static void setPrettyPrinting(boolean prettyPrint)
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.