Package org.springframework.boot.jackson
Annotation Type JsonComponent
@Target(TYPE) @Retention(RUNTIME) @Documented @Component public @interface JsonComponent
Component
that providesJsonSerializer
and/orJsonDeserializer
implementations to be registered with Jackson whenJsonComponentModule
is in use. Can be used to annotateJsonSerializer
orJsonDeserializer
implementations directly or a class that contains them as inner-classes. For example:@JsonComponent public class CustomerJsonComponent { public static class Serializer extends JsonSerializer<Customer> { // ... } public static class Deserializer extends JsonDeserializer<Customer> { // ... } }
- Since:
- 1.4.0
- See Also:
JsonComponentModule