Annotation Type Json.MixIn

Enclosing class:
Json

@Retention(CLASS) @Target(TYPE) public static @interface Json.MixIn
Mark this Class as a MixIn Type that can add Jsonb Annotations on the specified type.

These types are typically in an external project / dependency or otherwise types that we can't or don't want to explicitly annotate with @Json.

In the example below, the VehicleMixin class augments the the generated Vehicle JsonB adapter to use "ford-type" as the json property.

invalid input: '{@code

   @Json.MixIn(Vehicle.class)
   public abstract class VehicleMixIn {

   @Json.Property("ford-type")
   private String type;
    ...

 }</pre>'
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The concrete type to mix.
  • Element Details

    • value

      Class<?> value
      The concrete type to mix.