com.novell.sentinel.json
Interface JSONHandler

All Known Implementing Classes:
DelegatingJSONHandlerImpl, JSONSerializer, JSONSerializerBase, JSONToString, JSONTransporterMethods.BeanHandler, NullJSONHandlerImpl

public interface JSONHandler

Interface for handling JSON, modeled on SAX ContentHandler.


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.
 JSONHandler startArray()
          Start a new JSON array.
 JSONHandler startObject()
          Start a new JSON object.
 JSONHandler stringValue(String value)
          Report a JSON string value.
 

Method Detail

startObject

JSONHandler startObject()
                        throws IOException
Start a new JSON object.

Returns:
This handler instance.
Throws:
IOException

endObject

JSONHandler endObject()
                      throws IOException
End the current JSON object.

Returns:
This handler instance.
Throws:
IOException

startArray

JSONHandler startArray()
                       throws IOException
Start a new JSON array.

Returns:
This handler instance.
Throws:
IOException

endArray

JSONHandler endArray()
                     throws IOException
End the current JSON array.

Returns:
This handler instance.
Throws:
IOException

name

JSONHandler name(String valueName)
                 throws IOException
Report the name for the following value (object, array, or simple value).

Parameters:
valueName - The value name.
Returns:
This handler instance.
Throws:
IOException

stringValue

JSONHandler stringValue(String value)
                        throws IOException
Report a JSON string value.

Parameters:
value - The value.
Returns:
This handler instance.
Throws:
IOException

numberValue

JSONHandler numberValue(String numberValue)
                        throws IOException
Report a JSON number value. The implementation is responsible for converting the lexical representation into the appropriate Java type.

Parameters:
numberValue - The lexical representation of a JSON number value.
Returns:
This handler instance.
Throws:
IOException

booleanValue

JSONHandler booleanValue(boolean booleanValue)
                         throws IOException
Report a JSON boolean value.

Parameters:
booleanValue - true or false
Returns:
This handler instance.
Throws:
IOException

nullValue

JSONHandler nullValue()
                      throws IOException
Report a JSON null value.

Returns:
This handler instance.
Throws:
IOException