Enum Class JsonFormat.Shape

java.lang.Object
java.lang.Enum<JsonFormat.Shape>
cloud.opencode.base.json.annotation.JsonFormat.Shape
All Implemented Interfaces:
Serializable, Comparable<JsonFormat.Shape>, Constable
Enclosing class:
JsonFormat

public static enum JsonFormat.Shape extends Enum<JsonFormat.Shape>
Shape of the JSON value JSON 值的形状
Since:
JDK 25, opencode-base-json V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Enum Constant Details

    • ANY

      public static final JsonFormat.Shape ANY
      Default shape based on type. 基于类型的默认形状。
    • SCALAR

      public static final JsonFormat.Shape SCALAR
      Force scalar (non-structured) value. 强制标量(非结构化)值。
    • ARRAY

      public static final JsonFormat.Shape ARRAY
      Force array output. 强制数组输出。
    • OBJECT

      public static final JsonFormat.Shape OBJECT
      Force object output. 强制对象输出。
    • NUMBER

      public static final JsonFormat.Shape NUMBER
      Force number output. 强制数字输出。
    • NUMBER_INT

      public static final JsonFormat.Shape NUMBER_INT
      Force integer number output. 强制整数输出。
    • NUMBER_FLOAT

      public static final JsonFormat.Shape NUMBER_FLOAT
      Force floating-point number output. 强制浮点数输出。
    • STRING

      public static final JsonFormat.Shape STRING
      Force string output. 强制字符串输出。
    • BOOLEAN

      public static final JsonFormat.Shape BOOLEAN
      Force boolean output. 强制布尔值输出。
  • Method Details

    • values

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

      public static JsonFormat.Shape valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null