Marks a type for JSON support.
Examples:
@Json(naming = LowerHyphen)
public class Customer ...
@Json
public record Product( ... )
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Define one or more alternative names for a property accepted during deserialization.static @interface
Exclude the property from serialization, deserialization or both.static @interface
Specify types to generate JsonAdapters for.static @interface
Deprecated.static @interface
Mark this Class as a MixIn Type that can add Jsonb Annotations on the specified type.static enum
The naming convention that we can use for a given type.static @interface
Override the json property name.static @interface
Marks a String field as containing raw JSON content.static @interface
Specify the subtypes that a given type can be represented as.static @interface
Container of all the concrete SubType's that an interface type or abstract type can be represented as.static @interface
Annotate aMap<String,Object>
field to hold unmapped json properties.static @interface
Mark a method on an Enum that provides the json value. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
When 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.SubType
is 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.SubType
is used this specifies the name of the property field that holds the type name (discriminator value).This defaults to
@type
when unspecified.- Default:
"@type"
-
caseInsensitiveKeys
boolean caseInsensitiveKeysWhen set to true on deserialization keys are matched insensitive to case.- Default:
false
-
Json.Alias
.