Annotation Type Json


@Retention(CLASS) @Target(TYPE) public @interface Json
Marks a type for JSON support.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Exclude the property from serialization, deserialization or both.
    static @interface 
    Specify types to generate JsonAdapters for.
    static enum 
    The naming convention that we can use for a given type.
    static @interface 
    Override the json property name.
    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 a Map<String,Object> field to hold unmapped json properties.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    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

      Specify the naming convention to use for the properties on this type.
      Default:
      Match
    • typeProperty

      When @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:
      ""