Class JsonNull


  • public final class JsonNull
    extends JsonElement
    A class representing a Json null value.
    Since:
    1.2
    • Field Detail

      • INSTANCE

        public static final JsonNull INSTANCE
        singleton for JsonNull
        Since:
        1.8
    • Constructor Detail

      • JsonNull

        @Deprecated
        public JsonNull()
        Deprecated.
        Creates a new JsonNull object. Deprecated since Gson version 1.8. Use INSTANCE instead
    • Method Detail

      • deepCopy

        public JsonNull deepCopy()
        Returns the same instance since it is an immutable value
        Specified by:
        deepCopy in class JsonElement
        Since:
        2.8.2
      • hashCode

        public int hashCode()
        All instances of JsonNull have the same hash code since they are indistinguishable
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        All instances of JsonNull are the same
        Overrides:
        equals in class java.lang.Object