public class JsonMetadataList extends JsonMetadataBase
Constructor and Description |
---|
JsonMetadataList() |
Modifier and Type | Method and Description |
---|---|
static List<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(List<Metadata> metadataList,
Writer writer)
Serializes a Metadata object to Json.
|
public static void toJson(List<Metadata> metadataList, Writer writer) throws TikaException
metadataList
- list of metadata to writewriter
- writerTikaException
- if there is an IOException during writingpublic static List<Metadata> fromJson(Reader reader) throws TikaException
reader
- TikaException
- 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–2022 The Apache Software Foundation. All rights reserved.