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 void |
setGson(com.google.gson.Gson gson)
Enables setting custom configurations on Gson.
|
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
- Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.