Annotation Interface Array


@Retention(RUNTIME) @Target(FIELD) public @interface Array
When this annotation is used on a collection or an array additional properties and constraints can be applied.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Determines if the collection is allowed to be empty.
    boolean
    Determines if collections containing complex objects can be inlined.
    int
    The threshold used when deciding if the collection should be inlined.
  • Element Details

    • inlineCount

      int inlineCount
      The threshold used when deciding if the collection should be inlined. Inlined collections are written as arrays without newlines between their values.
      Returns:
      The threshold for deciding if the collection should be inlined.
      Default:
      5
    • inlineComplex

      boolean inlineComplex
      Determines if collections containing complex objects can be inlined. By default, only JSON primitives will be inlinable.
      Returns:
      If complex objects can be inlined.
      Default:
      false
    • allowEmpty

      boolean allowEmpty
      Determines if the collection is allowed to be empty.
      Returns:
      If the collection may be empty.
      Default:
      true