Package com.couchbase.client.java.json
Class JsonValue
- java.lang.Object
-
- com.couchbase.client.java.json.JsonValue
-
- Direct Known Subclasses:
JsonArray
,JsonNull
,JsonObject
public abstract class JsonValue extends Object
Represents a JSON value (either aJsonObject
or aJsonArray
.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description JsonValue()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
checkType(Object item)
Helper method to check if the given item is a supported JSON item.static JsonArray
ja()
Static factory method to create an emptyJsonArray
.static JsonObject
jo()
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.
-
-