Marks a type for JSON support.
Examples:
@Json(naming = LowerHyphen)
public class Customer ...
@Json
public record Product( ... )
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDefine one or more alternative names for a property accepted during deserialization.static @interfaceExclude the property from serialization, deserialization or both.static @interfaceSpecify types to generate JsonAdapters for.static @interfaceDeprecated.static @interfaceMark this Class as a MixIn Type that can add Jsonb Annotations on the specified type.static enumThe naming convention that we can use for a given type.static @interfaceOverride the json property name.static @interfaceMarks a String field as containing raw JSON content.static @interfaceSpecify the subtypes that a given type can be represented as.static @interfaceContainer of all the concrete SubType's that an interface type or abstract type can be represented as.static @interfaceAnnotate aMap<String,Object>field to hold unmapped json properties.static @interfaceMark a method on an Enum that provides the json value. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhen set to true on deserialization keys are matched insensitive to case.Specify the naming convention to use for the properties on this type.When@Json.SubTypeis used this specifies the name of the property field that holds the type name (discriminator value).
-
Element Details
-
naming
Json.Naming namingSpecify the naming convention to use for the properties on this type.By default, the naming used is
Json.Naming.Match- Default:
Match
-
typeProperty
String typePropertyWhen@Json.SubTypeis used this specifies the name of the property field that holds the type name (discriminator value).This defaults to
@typewhen unspecified.- Default:
"@type"
-
caseInsensitiveKeys
boolean caseInsensitiveKeysWhen set to true on deserialization keys are matched insensitive to case.- Default:
false
-
Json.Alias.