Annotation Type CustomSerialization
-
@Experimental("Remains to be determined if this is the best possible API for users to configure per Resource Method Serialization") @Retention(RUNTIME) @Target(METHOD) public @interface CustomSerializationAnnotation that can be used on RESTEasy Reactive Resource method to allow users to configure Jackson serialization for that method only, without affecting the global Jackson configuration.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description Class<? extends BiFunction<com.fasterxml.jackson.databind.ObjectMapper,Type,com.fasterxml.jackson.databind.ObjectWriter>>valueABiFunctionthat converts the globalObjectMapperand type for which a customObjectWriteris needed (this type will be a generic type if the method returns such a generic type) and returns the instance of the customObjectWriter.
-
-
-
Element Detail
-
value
Class<? extends BiFunction<com.fasterxml.jackson.databind.ObjectMapper,Type,com.fasterxml.jackson.databind.ObjectWriter>> value
ABiFunctionthat converts the globalObjectMapperand type for which a customObjectWriteris needed (this type will be a generic type if the method returns such a generic type) and returns the instance of the customObjectWriter. Quarkus will construct one instance of thisBiFunctionfor each JAX-RS resource method that is annotated withCustomSerializationand once an instance is created it will be cached for subsequent usage by that resource method. The class MUST contain a no-args constructor and it is advisable that it contains no state that is updated outside its constructor. Furthermore, theObjectMappershould NEVER be changed any way as it is the global ObjectMapper that is accessible to the entire Quarkus application.
-
-