Class JsonValue
- java.lang.Object
-
- com.couchbase.client.java.document.json.JsonValue
-
- Direct Known Subclasses:
JsonArray,JsonNull,JsonObject
public abstract class JsonValue extends Object
Represents a JSON value (either aJsonObjector aJsonArray.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description JsonValue()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckType(Object item)Helper method to check if the given item is a supported JSON item.static JsonArrayja()Static factory method to create an emptyJsonArray.static JsonObjectjo()Static factory method to create an emptyJsonObject.
-
-
-
Field Detail
-
NULL
public static final JsonNull NULL
Represents a Json "null".
-
-
Method Detail
-
jo
public static JsonObject jo()
Static factory method to create an emptyJsonObject.- Returns:
- an empty
JsonObject.
-
ja
public static JsonArray ja()
Static factory method to create an emptyJsonArray.- Returns:
- an empty
JsonArray.
-
checkType
public static boolean checkType(Object item)
Helper method to check if the given item is a supported JSON item.- Parameters:
item- the value to check.- Returns:
- true if supported, false otherwise.
-
-