JsonComponent

@Component that provides JsonSerializer, JsonDeserializer or KeyDeserializer implementations to be registered with Jackson when JsonComponentModule is in use. Can be used to annotate 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

Author

Phillip Webb

Paul Aly

See also

Types

Link copied to clipboard
enum Scope
The various scopes under which a serializer/deserializer can be registered.

Functions

Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun scope(): JsonComponent.Scope
The scope under which the serializer/deserializer should be registered with the module.
Link copied to clipboard
abstract fun toString(): String
Link copied to clipboard
abstract fun type(): Array<Class<out Any>>
The types that are handled by the provided serializer/deserializer.
Link copied to clipboard
@AliasFor(annotation = Component::class)
abstract fun value(): String
The value may indicate a suggestion for a logical component name, to be turned into a Spring bean in case of an autodetected component.