public abstract class JsonSerializer<T> extends Object
| Constructor and Description |
|---|
JsonSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doSerialize(JsonWriter writer,
T value,
JsonSerializationContext ctx)
Serializes a non-null object into JSON output.
|
void |
serialize(JsonWriter writer,
T value,
JsonSerializationContext ctx)
Serializes an object into JSON output.
|
public void serialize(JsonWriter writer, T value, JsonSerializationContext ctx) throws JsonSerializationException
writer - JsonWriter used to write the serialized JSONvalue - Object to serializectx - Context for the full serialization processJsonSerializationException - if an error occurs during the serializationprotected abstract void doSerialize(JsonWriter writer, @Nonnull T value, JsonSerializationContext ctx) throws IOException
writer - JsonWriter used to write the serialized JSONvalue - Object to serializectx - Context for the full serialization processIOException - if an error occurs while writing the outputCopyright © 2013. All Rights Reserved.