public final class JSONNull extends Object implements JSON
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(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.
|
String |
toString()
Get the "null" string value.
|
String |
toString(int indentFactor)
Make a prettyprinted JSON text.
|
String |
toString(int indentFactor,
int indent)
Make a prettyprinted JSON text.
|
Writer |
write(Writer writer)
Write the contents as JSON text to a writer.
|
Writer |
writeCanonical(Writer w)
Writes the canonicalized form of this JSON object.
|
public static JSONNull getInstance()
public boolean equals(Object object)
public boolean isArray()
JSONpublic boolean isEmpty()
JSONpublic int size()
JSONpublic String toString()
public String toString(int indentFactor)
JSONWarning: This method assumes that the data structure is acyclical.
public 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 Writer write(Writer writer) throws IOException
JSONWarning: This method assumes that the data structure is acyclical.
write in interface JSONIOExceptionpublic Writer writeCanonical(Writer w) throws IOException
JSONwriteCanonical in interface JSONIOExceptionCopyright © 2006–2013 Json-lib. All rights reserved.