Class ObjectShapeSerdeHelper
java.lang.Object
io.micronaut.serde.support.util.ObjectShapeSerdeHelper
Common helpers for POJO-like shape handling.
- Since:
- 3.0
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Deserializer<T> objectDeserializer(Deserializer.DecoderContext context, io.micronaut.core.type.Argument<? super T> type) Select the generic object deserializer for POJO-like shape handling.static <T> Serializer<T> objectSerializer(Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type) Select the generic object serializer for POJO-like shape handling.
-
Method Details
-
objectSerializer
public static <T> Serializer<T> objectSerializer(Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type) throws SerdeException Select the generic object serializer for POJO-like shape handling.- Type Parameters:
T- The serialized type- Parameters:
context- The encoder contexttype- The type- Returns:
- The object serializer
- Throws:
SerdeException
-
objectDeserializer
public static <T> Deserializer<T> objectDeserializer(Deserializer.DecoderContext context, io.micronaut.core.type.Argument<? super T> type) throws SerdeException Select the generic object deserializer for POJO-like shape handling.- Type Parameters:
T- The deserialized type- Parameters:
context- The decoder contexttype- The type- Returns:
- The object deserializer
- Throws:
SerdeException
-