|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.sentinel.json.JSONSerializerBase
public abstract class JSONSerializerBase
Base class for implementations that wish to serialize events sent to a JSONHandler.
Constructor Summary | |
---|---|
JSONSerializerBase()
Default constructor. |
Method Summary | |
---|---|
JSONHandler |
booleanValue(boolean booleanValue)
Report a JSON boolean value. |
JSONHandler |
endArray()
End the current JSON array. |
JSONHandler |
endObject()
End the current JSON object. |
JSONHandler |
name(String valueName)
Report the name for the following value (object, array, or simple value). |
JSONHandler |
nullValue()
Report a JSON null value. |
JSONHandler |
numberValue(String numberValue)
Report a JSON number value. |
void |
setIndent(boolean indent)
Cause the output to be indented in a more-human readable form. |
JSONHandler |
startArray()
Start a new JSON array. |
JSONHandler |
startObject()
Start a new JSON object. |
JSONHandler |
stringValue(String value)
Report a JSON string value. |
boolean |
willIndent()
|
protected abstract void |
write(char value)
Output the passed char to whatever destination the derived class specifies. |
protected abstract void |
write(String value)
Output the passed string to whatever destination the derived class specifies. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JSONSerializerBase()
Method Detail |
---|
protected abstract void write(String value) throws IOException
value
- The value to write.
IOException
- If an error occurs while writing.protected abstract void write(char value) throws IOException
value
- The value to write.
IOException
- If an error occurs while writing.public void setIndent(boolean indent)
indent
- public boolean willIndent()
public JSONHandler startObject() throws IOException
JSONHandler
startObject
in interface JSONHandler
IOException
public JSONHandler endObject() throws IOException
JSONHandler
endObject
in interface JSONHandler
IOException
public JSONHandler startArray() throws IOException
JSONHandler
startArray
in interface JSONHandler
IOException
public JSONHandler endArray() throws IOException
JSONHandler
endArray
in interface JSONHandler
IOException
public JSONHandler name(String valueName) throws IOException
JSONHandler
name
in interface JSONHandler
valueName
- The value name.
IOException
public JSONHandler stringValue(String value) throws IOException
JSONHandler
stringValue
in interface JSONHandler
value
- The value.
IOException
public JSONHandler numberValue(String numberValue) throws IOException
JSONHandler
numberValue
in interface JSONHandler
numberValue
- The lexical representation of a JSON number value.
IOException
public JSONHandler booleanValue(boolean booleanValue) throws IOException
JSONHandler
booleanValue
in interface JSONHandler
booleanValue
- true or false
IOException
public JSONHandler nullValue() throws IOException
JSONHandler
nullValue
in interface JSONHandler
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |