Annotation Type AllowAny


@Retention(RUNTIME)
@Target(FIELD)
@Documented
public @interface AllowAny
Indicate that a field may contain any type that is compatible with the declaration. This will cause the library to use dynamic serialization based on names for the field. This annotation is handled when using ReflectionSerializer.

Example:

  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    boolean compact
    Set if this should use the compact format or not.
  • Element Details

    • compact

      boolean compact
      Set if this should use the compact format or not. The compact format will write the container as a list, while the non-compact format is an object with the keys namespace, name, value.
      Returns:
      Default:
      false