java.lang.Object
com.google.gson.JsonElement
com.google.gson.JsonNull
A class representing a JSON
null value.- Since:
- 1.2
- Author:
- Inderjeet Singh, Joel Leitch
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.google.gson.JsonElement
getAsBigDecimal, getAsBigInteger, getAsBoolean, getAsByte, getAsCharacter, getAsDouble, getAsFloat, getAsInt, getAsJsonArray, getAsJsonNull, getAsJsonObject, getAsJsonPrimitive, getAsLong, getAsNumber, getAsShort, getAsString, isJsonArray, isJsonNull, isJsonObject, isJsonPrimitive, toString
-
Field Details
-
INSTANCE
Singleton forJsonNull.- Since:
- 1.8
-
-
Constructor Details
-
JsonNull
Deprecated.Deprecated since Gson version 1.8, useINSTANCEinstead.Creates a newJsonNullobject.
-
-
Method Details
-
deepCopy
Returns the same instance since it is an immutable value.- Specified by:
deepCopyin classJsonElement- Since:
- 2.8.2
-
hashCode
public int hashCode()All instances ofJsonNullhave the same hash code since they are indistinguishable. -
equals
All instances ofJsonNullare considered equal.
-
INSTANCEinstead.