Package com.azure.json.models
Class JsonElement
java.lang.Object
com.azure.json.models.JsonElement
- All Implemented Interfaces:
JsonSerializable<JsonElement>
- Direct Known Subclasses:
JsonArray,JsonBoolean,JsonNull,JsonNumber,JsonObject,JsonString
Interface defining methods that all JSON types must implement.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisArray()Indicates whether the element is an array.booleanIndicates whether the element is a boolean.booleanisNull()Indicates whether the element is a null.booleanisNumber()Indicates whether the element is a number.booleanisObject()Indicates whether the element is an object.booleanisString()Indicates whether the element is a string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
JsonElement
public JsonElement()Default constructor.
-
-
Method Details
-
isArray
public boolean isArray()Indicates whether the element is an array.- Returns:
- Whether the element is an array.
-
isObject
public boolean isObject()Indicates whether the element is an object.- Returns:
- Whether the element is an object.
-
isBoolean
public boolean isBoolean()Indicates whether the element is a boolean.- Returns:
- Whether the element is a boolean.
-
isNull
public boolean isNull()Indicates whether the element is a null.- Returns:
- Whether the element is a null.
-
isNumber
public boolean isNumber()Indicates whether the element is a number.- Returns:
- Whether the element is a number.
-
isString
public boolean isString()Indicates whether the element is a string.- Returns:
- Whether the element is a string.
-