public static enum JsonFormat.Shape extends Enum<JsonFormat.Shape>
Enum Constant and Description |
---|
ANY
Marker enum value that indicates "whatever" choice, meaning that annotation
does NOT specify shape to use.
|
ARRAY
Value that indicates that (JSON) Array type should be used.
|
BINARY
Value that indicates that Binary type (native, if format supports it;
encoding using Base64 if only textual types supported) should be used.
|
BOOLEAN
Value that indicates that (JSON) boolean type
(true, false) should be used.
|
NATURAL
Marker enum value that indicates the "default" choice for given datatype;
for example, JSON String for
String , or JSON Number
for Java numbers. |
NUMBER
Value that indicates that a numeric (JSON) type should be used
(but does not specify whether integer or floating-point representation
should be used)
|
NUMBER_FLOAT
Value that indicates that floating-point numeric type should be used
|
NUMBER_INT
Value that indicates that integer number type should be used
(and not
NUMBER_FLOAT ). |
OBJECT
Value that indicates that (JSON) Object type should be used.
|
SCALAR
|
STRING
Value that indicates that (JSON) String type should be used.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isNumeric() |
boolean |
isStructured() |
static JsonFormat.Shape |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonFormat.Shape[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonFormat.Shape ANY
NATURAL
, which
specifically instructs use of the "natural" shape for datatype.public static final JsonFormat.Shape NATURAL
String
, or JSON Number
for Java numbers.
Note that this is different from ANY
in that this is actual
explicit choice that overrides possible default settings.public static final JsonFormat.Shape SCALAR
public static final JsonFormat.Shape ARRAY
public static final JsonFormat.Shape OBJECT
public static final JsonFormat.Shape NUMBER
public static final JsonFormat.Shape NUMBER_FLOAT
public static final JsonFormat.Shape NUMBER_INT
NUMBER_FLOAT
).public static final JsonFormat.Shape STRING
public static final JsonFormat.Shape BOOLEAN
public static final JsonFormat.Shape BINARY
public static JsonFormat.Shape[] values()
for (JsonFormat.Shape c : JsonFormat.Shape.values()) System.out.println(c);
public static JsonFormat.Shape 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 boolean isNumeric()
public boolean isStructured()
Copyright © 2008–2021 FasterXML. All rights reserved.