JsonBoolean Class
- java.
lang. Object - com.
azure. json. models. JsonElement - com.
azure. json. models. JsonBoolean
- com.
- com.
public final class JsonBoolean
extends JsonElement
Model representing a JSON boolean value.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Json |
fromJson(JsonReader jsonReader)
Deserializes a JSON boolean from a Json |
|
static
Json |
getInstance(boolean value)
Gets the instance of Json |
| boolean |
getValue()
Returns boolean value from a Json |
| boolean |
isBoolean()
Identifies if an object is of type Json |
|
Json |
toJson(JsonWriter jsonWriter) |
| String | toJsonString() |
Methods inherited from JsonElement
Methods inherited from java.lang.Object
Method Details
fromJson
public static JsonBoolean fromJson(JsonReader jsonReader)
Deserializes a JSON boolean from a JsonReader.
If the JsonReader's current token is null, it is assumed the JsonReader hasn't begun reading and nextToken() will be called to begin reading.
After ensuring the JsonReader has begun reading, if the current token is not BOOLEAN, an IllegalStateException will be thrown. Otherwise, getInstance(boolean value) will be called to return the deserialized JSON boolean.
Parameters:
Returns:
Throws:
getInstance
public static JsonBoolean getInstance(boolean value)
Gets the instance of JsonBoolean for the specified boolean value.
Parameters:
Returns:
getValue
public boolean getValue()
Returns boolean value from a JsonBoolean object.
Returns:
isBoolean
public boolean isBoolean()
Identifies if an object is of type JsonBoolean.
Overrides:
JsonBoolean.isBoolean()Returns: