1 /*
2 * SPDX-FileCopyrightText: none
3 * SPDX-License-Identifier: CC0-1.0
4 */
5
6 package dev.metaschema.core.model;
7
8 /**
9 * Defines how repeated instances are grouped in JSON/YAML representations.
10 */
11 public enum JsonGroupAsBehavior {
12 /**
13 * In JSON, the group of instances will be represented as a JSON object, with
14 * each instance's JSON key used as the property and the remaining data
15 * represented as a child object of that property.
16 */
17 KEYED,
18 /**
19 * In JSON, the group of instances will be represented as a single JSON object
20 * if there is one, or as an array of JSON objects if there is more than one. An
21 * empty array will be used when no items exist in the group.
22 */
23 SINGLETON_OR_LIST,
24 /**
25 * In JSON, the group of instances will be represented as an array of JSON
26 * objects if there is more than one. An empty array will be used when no items
27 * exist in the group.
28 */
29 LIST,
30 /**
31 * In JSON, the group of instances will be represented as a single JSON object.
32 */
33 NONE
34 }