There are cases during serialization and deserialization where it would be useful to have the current java.lang.reflect.AnnotatedElement of the object being serialized or deserialized. The AnnotatedElement could be found on the current SerializationContext or DeserializationContext context or new methods could be added to the JsonbSerializer and the JsonbDeserializer which pass a parameter.
The use-case is looking up an annotation on a element which could provide additional information for serialization and deserialization. For example being able to look up the @JsonbDateFormat when you have a custom serializer for some kind of date object.
There are cases during serialization and deserialization where it would be useful to have the current
java.lang.reflect.AnnotatedElementof the object being serialized or deserialized. TheAnnotatedElementcould be found on the currentSerializationContextorDeserializationContextcontext or new methods could be added to theJsonbSerializerand theJsonbDeserializerwhich pass a parameter.The use-case is looking up an annotation on a element which could provide additional information for serialization and deserialization. For example being able to look up the
@JsonbDateFormatwhen you have a custom serializer for some kind of date object.