public class JsonMetadata extends Object
Constructor and Description |
---|
JsonMetadata() |
Modifier and Type | Method and Description |
---|---|
static Metadata |
fromJson(Reader reader)
Read metadata from reader.
|
static 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(Metadata metadata,
Writer writer)
Serializes a Metadata object to Json.
|
public static void toJson(Metadata metadata, Writer writer) throws IOException
metadata
- metadata to writewriter
- writerTikaException
- if there is an IOException during writingIOException
public static 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 Metadata readMetadataObject(com.fasterxml.jackson.core.JsonParser jParser) throws IOException
jParser
- IOException
public static void setPrettyPrinting(boolean prettyPrint)
Copyright © 2007–2023 The Apache Software Foundation. All rights reserved.