public class JsonMetadataSerializer extends Object implements com.google.gson.JsonSerializer<Metadata>
Constructor and Description |
---|
JsonMetadataSerializer() |
Modifier and Type | Method and Description |
---|---|
protected String[] |
getNames(Metadata metadata)
Override to get a custom sort order
or to filter names.
|
com.google.gson.JsonElement |
serialize(Metadata metadata,
Type type,
com.google.gson.JsonSerializationContext context)
Serializes a Metadata object into effectively Map
|
public com.google.gson.JsonElement serialize(Metadata metadata, Type type, com.google.gson.JsonSerializationContext context)
serialize
in interface com.google.gson.JsonSerializer<Metadata>
metadata
- object to serializetype
- (ignored)context
- (ignored)Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.