Class JohnzonJsonbAdapter<JsonType,OriginalType>
java.lang.Object
org.apache.johnzon.jsonb.converter.JohnzonJsonbAdapter<JsonType,OriginalType>
- All Implemented Interfaces:
Adapter<OriginalType,,JsonType> MapperConverter,TypeAwareAdapter<OriginalType,JsonType>
public class JohnzonJsonbAdapter<JsonType,OriginalType>
extends Object
implements TypeAwareAdapter<OriginalType,JsonType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final jakarta.json.bind.adapter.JsonbAdapter<OriginalType,JsonType> private final Typeprivate final AdapterKeyprivate final Type -
Constructor Summary
ConstructorsConstructorDescriptionJohnzonJsonbAdapter(jakarta.json.bind.adapter.JsonbAdapter<OriginalType, JsonType> delegate, Type from, Type to) -
Method Summary
Modifier and TypeMethodDescriptionfrom(OriginalType obj) Take the POJO_TYPE object A from a POJO an convert it to JSON_TYPE which will be inserted into the JSON output.getFrom()getKey()getTo()Transfer JSONTYPE_TYPE from JSON to POJO as POJO_TYPE.
-
Field Details
-
delegate
-
from
-
to
-
key
-
-
Constructor Details
-
JohnzonJsonbAdapter
public JohnzonJsonbAdapter(jakarta.json.bind.adapter.JsonbAdapter<OriginalType, JsonType> delegate, Type from, Type to)
-
-
Method Details
-
to
Description copied from interface:AdapterTransfer JSONTYPE_TYPE from JSON to POJO as POJO_TYPE.- Specified by:
toin interfaceAdapter<JsonType,OriginalType> - Parameters:
obj- the JSON type- Returns:
- the equivalent Java type
-
from
Description copied from interface:AdapterTake the POJO_TYPE object A from a POJO an convert it to JSON_TYPE which will be inserted into the JSON output.- Specified by:
fromin interfaceAdapter<JsonType,OriginalType> - Parameters:
obj- the Java type- Returns:
- the equivalent JSON type
-
getKey
- Specified by:
getKeyin interfaceTypeAwareAdapter<JsonType,OriginalType>
-
getTo
- Specified by:
getToin interfaceTypeAwareAdapter<JsonType,OriginalType>
-
getFrom
- Specified by:
getFromin interfaceTypeAwareAdapter<JsonType,OriginalType>
-