public enum JsonType extends Enum<JsonType>
Implements custom
// Produces 'number', not 'NUMBER'. String json = JsonSerializer.DEFAULT.serialize(JsonType.NUMBER);
Enum Constant and Description |
---|
ANY
any
|
ARRAY
array
|
BOOLEAN
boolean
|
INTEGER
integer
|
NULL
null
|
NUMBER
number
|
OBJECT
object
|
STRING
string
|
Modifier and Type | Method and Description |
---|---|
static JsonType |
fromString(String value)
Converts the specified lowercase form of the enum back into an
|
String |
toString()
Returns the lowercase form of this enum that's compatible with the JSON-Schema specification.
|
static JsonType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static JsonType[] values()
for (JsonType c : JsonType.values()) System.out.println(c);
public static JsonType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String toString()
public static JsonType fromString(String value)
value
- The lowercase form of the enum (e.g. Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.