Package de.ppi.deepsampler.junit.json
Annotation Type UseJsonSerializer
@Retention(RUNTIME)
@Target({METHOD,TYPE})
@Repeatable(UseJsonSerializers.class)
public @interface UseJsonSerializer
This annotation can be used to register a
JsonSerializer for the underlying Jackson JSON parser.
The annotation can be placed on
- a test method
- the class that declares the test method
- the method
SamplerFixture.defineSamplers() - the class that defines the method defineSamplers
UseJsonSerializer is used at more than one of the aforementioned places, and several of them define JsonSerializers
for the same type, the ones on top of the aforementioned list, override the lower ones.-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Class<?>forTypeTheClassfor which the serializer should be used.java.lang.Class<? extends com.fasterxml.jackson.databind.JsonSerializer<?>>serializerDefines the concrete class of theJsonSerializer
-
Element Details
-
serializer
java.lang.Class<? extends com.fasterxml.jackson.databind.JsonSerializer<?>> serializerDefines the concrete class of theJsonSerializer- Returns:
- the concrete class of the
JsonSerializer
-
forType
java.lang.Class<?> forTypeTheClassfor which the serializer should be used.- Returns:
- The
Classfor which the serializer should be used.
-