Package io.avaje.jsonb
Class JsonAdapter<T>
- java.lang.Object
-
- io.avaje.jsonb.JsonAdapter<T>
-
public abstract class JsonAdapter<T> extends Object
The core API for serialization to and from json.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
JsonAdapter.Factory
Factory for creating a JsonAdapter.
-
Constructor Summary
Constructors Constructor Description JsonAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract T
fromJson(JsonReader reader)
Read the type from the reader.boolean
isViewBuilderAware()
Return true if this adapter represents a json object or json array of objects that supports json views.JsonAdapter<T>
nullSafe()
Return a null safe version of this adapter.abstract void
toJson(JsonWriter writer, T value)
Write the value to the writer.ViewBuilderAware
viewBuild()
Return the ViewBuilder.Aware for this adapter.
-
-
-
Method Detail
-
toJson
public abstract void toJson(JsonWriter writer, T value)
Write the value to the writer.
-
fromJson
public abstract T fromJson(JsonReader reader)
Read the type from the reader.
-
nullSafe
public final JsonAdapter<T> nullSafe()
Return a null safe version of this adapter.
-
isViewBuilderAware
public boolean isViewBuilderAware()
Return true if this adapter represents a json object or json array of objects that supports json views.
-
viewBuild
public ViewBuilderAware viewBuild()
Return the ViewBuilder.Aware for this adapter.
-
-