Package io.avaje.jsonb
Class JsonAdapter<T>
java.lang.Object
io.avaje.jsonb.JsonAdapter<T>
The core API for serialization to and from json.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFactory for creating a JsonAdapter. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TfromJson(JsonReader reader) Read the type from the reader.booleanReturn true if this adapter represents a json object or json array of objects that supports json views.final JsonAdapter<T>nullSafe()Return a null safe version of this adapter.abstract voidtoJson(JsonWriter writer, T value) Write the value to the writer.Return the ViewBuilder.Aware for this adapter.
-
Constructor Details
-
JsonAdapter
public JsonAdapter()
-
-
Method Details
-
toJson
Write the value to the writer. -
fromJson
Read the type from the reader. -
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
Return the ViewBuilder.Aware for this adapter.
-