public class JSONWriter
extends java.lang.Object
Constructor and Description |
---|
JSONWriter() |
JSONWriter(boolean indenting) |
Modifier and Type | Method and Description |
---|---|
boolean |
getIndentMode() |
void |
setIndentMode(boolean value) |
java.lang.String |
write(boolean b) |
java.lang.String |
write(char c) |
java.lang.Object |
write(double d) |
java.lang.String |
write(long n) |
java.lang.String |
write(java.lang.Object object) |
void |
writeLimited(java.lang.Class<?> klass,
java.lang.Object object,
java.lang.String[] properties)
Write only a certain subset of the object's properties and fields.
|
public boolean getIndentMode()
public void setIndentMode(boolean value)
public java.lang.String write(java.lang.Object object)
public java.lang.String write(long n)
public java.lang.Object write(double d)
public java.lang.String write(char c)
public java.lang.String write(boolean b)
public void writeLimited(java.lang.Class<?> klass, java.lang.Object object, java.lang.String[] properties)
klass
- the class to look up properties etc inobject
- the objectproperties
- explicit list of property/field names to include - may be null for "all"