Package dev.drtheo.autojson.schema.baked
Class BakedClassAutoSchema<T>
java.lang.Object
dev.drtheo.autojson.schema.baked.BakedClassAutoSchema<T>
- All Implemented Interfaces:
ObjectSchema<T>,Schema<T>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> BakedClassAutoSchema<T><To> voiddeserialize(JsonAdapter<Object, To> auto, JsonDeserializationContext c, T t, String field) <To> voidserialize(JsonAdapter<Object, To> auto, JsonSerializationContext.Obj c, T t) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.drtheo.autojson.schema.base.ObjectSchema
serialize, typeMethods inherited from interface dev.drtheo.autojson.schema.base.Schema
asArray, asObject, asPrimitive, asWrapper
-
Method Details
-
bake
-
toString
-
serialize
- Specified by:
serializein interfaceObjectSchema<T>- Type Parameters:
To- the type the adapter serializes to.- Parameters:
auto- the adapter used to serialize this object.c- the serialization context. Used to provide the key-value pairs.t- the object you're serializing.
-
instantiate
- Specified by:
instantiatein interfaceObjectSchema<T>- Returns:
- A new instance of the object this schema serializes.
-
deserialize
public <To> void deserialize(JsonAdapter<Object, To> auto, JsonDeserializationContext c, T t, String field) - Specified by:
deserializein interfaceObjectSchema<T>- Type Parameters:
To- the type the adapter serializes to.- Parameters:
auto- the adapter used to deserialize this object.c- the deserialization context. Used to query the deserialization.t- the object you're deserializing the data into.field- the name of the field you're deserializing.
-