Enum Class JsonType

java.lang.Object
java.lang.Enum<JsonType>
org.svetovid.util.JsonType
All Implemented Interfaces:
Serializable, Comparable<JsonType>, java.lang.constant.Constable

public enum JsonType extends Enum<JsonType>
Enumeration of all JSON (JavaScript Object Notation) types.
Author:
Ivan Pribela
  • Enum Constant Details

    • NULL

      public static final JsonType NULL
      Null literal (null).
    • BOOLEAN

      public static final JsonType BOOLEAN
      Boolean literal (true or false).
    • NUMBER

      public static final JsonType NUMBER
      Number literal.
    • STRING

      public static final JsonType STRING
      String literal.
    • ARRAY

      public static final JsonType ARRAY
      JSON Array.
    • OBJECT

      public static final JsonType OBJECT
      JSON object.
    • UNKNOWN

      public static final JsonType UNKNOWN
      Unknown JSON type.
  • Method Details

    • values

      public static JsonType[] 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 JsonType 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
    • toString

      public String toString()
      Overrides:
      toString in class Enum<JsonType>