Class JsonStringParser
-
- All Implemented Interfaces:
-
dev.drtheo.autojson.SchemaHolder,dev.drtheo.autojson.adapter.JsonContext,dev.drtheo.autojson.adapter.JsonDeserializationContext
public class JsonStringParser implements JsonDeserializationContext
-
-
Constructor Summary
Constructors Constructor Description JsonStringParser(JsonStringAdapter adapter, String raw)
-
Method Summary
Modifier and Type Method Description static <T> Tprocess(JsonStringAdapter adapter, String raw, Type type)AutoJSONauto()<T> Schema<T>schema(Type type)<T> TdecodeBuiltIn()Decodes the value in the current context. <T> TdecodeCustom(Type type, @NotNull() Schema<T> fieldSchema)Decodes the value in the current context. -
Methods inherited from class dev.drtheo.autojson.adapter.JsonDeserializationContext
decode, decode, decodeCustom -
Methods inherited from class dev.drtheo.autojson.adapter.JsonContext
schemaHolder -
Methods inherited from class dev.drtheo.autojson.SchemaHolder
schema -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
JsonStringParser
JsonStringParser(JsonStringAdapter adapter, String raw)
-
-
Method Detail
-
process
static <T> T process(JsonStringAdapter adapter, String raw, Type type)
-
schema
<T> Schema<T> schema(Type type)
- Parameters:
type- the type of the schema.- Returns:
The schema for the specified type.
-
decodeBuiltIn
<T> T decodeBuiltIn()
Decodes the value in the current context.
- Returns:
The decoded built-in object.
-
decodeCustom
<T> T decodeCustom(Type type, @NotNull() Schema<T> fieldSchema)
Decodes the value in the current context.
- Parameters:
type- the type of the object to decode.- Returns:
The decoded non-built-in object.
-
-
-
-