public final class JSONNull extends java.lang.Object implements JSON
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
A Null object is equal to the null value and to itself.
|
static JSONNull |
getInstance()
Returns the singleton instance of JSONNull
|
int |
hashCode() |
boolean |
isArray()
Returns true if this object is a JSONArray, false otherwise.
|
boolean |
isEmpty()
Returns true if this object has no elements or keys.
|
int |
size()
Returns the number of properties in an object or the size of the array.
|
java.lang.String |
toString()
Get the "null" string value.
|
java.lang.String |
toString(int indentFactor)
Make a prettyprinted JSON text.
|
java.lang.String |
toString(int indentFactor,
int indent)
Make a prettyprinted JSON text.
|
java.io.Writer |
write(java.io.Writer writer)
Write the contents as JSON text to a writer.
|
java.io.Writer |
writeCanonical(java.io.Writer w)
Writes the canonicalized form of this JSON object.
|
public static JSONNull getInstance()
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - An object to test for nullness.public int hashCode()
hashCode in class java.lang.Objectpublic boolean isArray()
JSONpublic boolean isEmpty()
JSONpublic int size()
JSONpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(int indentFactor)
JSONWarning: This method assumes that the data structure is acyclical.
public java.lang.String toString(int indentFactor,
int indent)
JSONWarning: This method assumes that the data structure is acyclical.
toString in interface JSONindentFactor - The number of spaces to add to each level of
indentation.indent - The indentation of the top level.{ (left brace)
and ending with } (right brace).public java.io.Writer write(java.io.Writer writer)
throws java.io.IOException
JSONWarning: This method assumes that the data structure is acyclical.
public java.io.Writer writeCanonical(java.io.Writer w)
throws java.io.IOException
JSONwriteCanonical in interface JSONjava.io.IOExceptionCopyright © 2006-2013 Json-lib. All Rights Reserved.