Class JsonStringParser
java.lang.Object
dev.drtheo.autojson.adapter.string.JsonStringParser
- All Implemented Interfaces:
JsonContext,JsonDeserializationContext,SchemaHolder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauto()<T> TDecodes the value in the current context.<T> TdecodeCustom(Type type, @NotNull Schema<T> fieldSchema) Decodes the value in the current context.static <T> Tprocess(JsonStringAdapter adapter, String raw, Type type) <T> Schema<T>Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.drtheo.autojson.adapter.JsonContext
schemaHolderMethods inherited from interface dev.drtheo.autojson.adapter.JsonDeserializationContext
decode, decode
-
Constructor Details
-
JsonStringParser
-
-
Method Details
-
process
-
auto
- Specified by:
autoin interfaceJsonContext- Returns:
- The
AutoJSONinstance used by the context.
-
schema
- Specified by:
schemain interfaceJsonContext- Specified by:
schemain interfaceSchemaHolder- Type Parameters:
T- the type that schema supports.- Parameters:
type- the type of the schema.- Returns:
- The schema for the specified type.
-
decodeBuiltIn
public <T> T decodeBuiltIn()Description copied from interface:JsonDeserializationContextDecodes the value in the current context.- Specified by:
decodeBuiltInin interfaceJsonDeserializationContext- Type Parameters:
T- the type of the object.- Returns:
- The decoded built-in object.
- See Also:
-
decodeCustom
Description copied from interface:JsonDeserializationContextDecodes the value in the current context.- Specified by:
decodeCustomin interfaceJsonDeserializationContext- Type Parameters:
T- the type of the object.- Parameters:
type- the type of the object to decode.fieldSchema- the schema used to decode the value.- Returns:
- The decoded non-built-in object.
-