Enum JsonGroupAsBehavior

java.lang.Object
java.lang.Enum<JsonGroupAsBehavior>
dev.metaschema.core.model.JsonGroupAsBehavior
All Implemented Interfaces:
Serializable, Comparable<JsonGroupAsBehavior>

public enum JsonGroupAsBehavior extends Enum<JsonGroupAsBehavior>
Defines how repeated instances are grouped in JSON/YAML representations.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    In JSON, the group of instances will be represented as a JSON object, with each instance's JSON key used as the property and the remaining data represented as a child object of that property.
    In JSON, the group of instances will be represented as an array of JSON objects if there is more than one.
    In JSON, the group of instances will be represented as a single JSON object.
    In JSON, the group of instances will be represented as a single JSON object if there is one, or as an array of JSON objects if there is more than one.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • KEYED

      public static final JsonGroupAsBehavior KEYED
      In JSON, the group of instances will be represented as a JSON object, with each instance's JSON key used as the property and the remaining data represented as a child object of that property.
    • SINGLETON_OR_LIST

      public static final JsonGroupAsBehavior SINGLETON_OR_LIST
      In JSON, the group of instances will be represented as a single JSON object if there is one, or as an array of JSON objects if there is more than one. An empty array will be used when no items exist in the group.
    • LIST

      public static final JsonGroupAsBehavior LIST
      In JSON, the group of instances will be represented as an array of JSON objects if there is more than one. An empty array will be used when no items exist in the group.
    • NONE

      public static final JsonGroupAsBehavior NONE
      In JSON, the group of instances will be represented as a single JSON object.
  • Method Details

    • values

      public static JsonGroupAsBehavior[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static JsonGroupAsBehavior valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null