public class JsonMetadata extends JsonMetadataBase
Constructor and Description |
---|
JsonMetadata() |
Modifier and Type | Method and Description |
---|---|
static Metadata |
fromJson(Reader reader)
Read metadata from reader.
|
static void |
setGson(com.google.gson.Gson gson)
Enables setting custom configurations on Gson.
|
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 TikaException
metadata
- metadata to writewriter
- writerTikaException
- if there is an IOException during writingpublic static Metadata fromJson(Reader reader) throws TikaException
reader
- reader to read fromTikaException
- in case of parse failure by Gson or IO failure with Readerpublic static void setGson(com.google.gson.Gson gson)
gson
- public static void setPrettyPrinting(boolean prettyPrint)
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.