Package com.azure.json
Enum JsonWriteState
- All Implemented Interfaces:
Serializable
,Comparable<JsonWriteState>
,java.lang.constant.Constable
Writing context of the JSON stream.
Used by JsonWriter
to maintain state and determine validity of a write operation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JsonWriteState
Returns the enum constant of this type with the specified name.static JsonWriteState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ROOT
Root of the JSON stream.Indicates that writing hasn't begun.
-
OBJECT
In a JSON object.Indicates that either a JSON field, sub-object, or end of object should be written.
-
ARRAY
In a JSON array.Indicates that either a JSON value (binary data, boolean, number, string, object, or array) or end of array should be written.
-
FIELD
In a JSON field.Indicates that a JSON value (binary data, boolean, number, string, object, or array) should be written.
-
COMPLETED
JSON stream has completed.Indicates that a JSON value (binary data, boolean, number, string, object, or array) was written to root of the JSON stream. Writing after this point will result in invalid JSON, therefore all write operations will result in an exception being thrown.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-