- 
public interface ContentHandlerA simplified and stoppable SAX-like content handler for stream processing of JSON text.- Author:
 - FangYidong<fangyidong@yahoo.com.cn>
 - See Also:
 ContentHandler,JSONParser.parse(java.io.Reader, ContentHandler, boolean)
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanendArray()Receive notification of the end of a JSON array.voidendJSON()Receive notification of the end of JSON processing.booleanendObject()Receive notification of the end of a JSON object.booleanendObjectEntry()Receive notification of the end of the value of previous object entry.booleanprimitive(Object value)Receive notification of the JSON primitive values: java.lang.String, java.lang.Number, java.lang.Boolean nullbooleanstartArray()Receive notification of the beginning of a JSON array.voidstartJSON()Receive notification of the beginning of JSON processing.booleanstartObject()Receive notification of the beginning of a JSON object.booleanstartObjectEntry(String key)Receive notification of the beginning of a JSON object entry. 
 - 
 
- 
- 
Method Detail
- 
startJSON
void startJSON() throws ParseException, IOExceptionReceive notification of the beginning of JSON processing. The parser will invoke this method only once.- Throws:
 ParseException- - JSONParser will stop and throw the same exception to the caller when receiving this exception.IOException
 
- 
endJSON
void endJSON() throws ParseException, IOExceptionReceive notification of the end of JSON processing.- Throws:
 ParseExceptionIOException
 
- 
startObject
boolean startObject() throws ParseException, IOExceptionReceive notification of the beginning of a JSON object.- Returns:
 - false if the handler wants to stop parsing after return.
 - Throws:
 ParseException- - JSONParser will stop and throw the same exception to the caller when receiving this exception.IOException- See Also:
 endJSON()
 
- 
endObject
boolean endObject() throws ParseException, IOExceptionReceive notification of the end of a JSON object.- Returns:
 - false if the handler wants to stop parsing after return.
 - Throws:
 ParseExceptionIOException- See Also:
 startObject()
 
- 
startObjectEntry
boolean startObjectEntry(String key) throws ParseException, IOException
Receive notification of the beginning of a JSON object entry.- Parameters:
 key- - Key of a JSON object entry.- Returns:
 - false if the handler wants to stop parsing after return.
 - Throws:
 ParseExceptionIOException- See Also:
 endObjectEntry()
 
- 
endObjectEntry
boolean endObjectEntry() throws ParseException, IOExceptionReceive notification of the end of the value of previous object entry.- Returns:
 - false if the handler wants to stop parsing after return.
 - Throws:
 ParseExceptionIOException- See Also:
 startObjectEntry(java.lang.String)
 
- 
startArray
boolean startArray() throws ParseException, IOExceptionReceive notification of the beginning of a JSON array.- Returns:
 - false if the handler wants to stop parsing after return.
 - Throws:
 ParseExceptionIOException- See Also:
 endArray()
 
- 
endArray
boolean endArray() throws ParseException, IOExceptionReceive notification of the end of a JSON array.- Returns:
 - false if the handler wants to stop parsing after return.
 - Throws:
 ParseExceptionIOException- See Also:
 startArray()
 
- 
primitive
boolean primitive(Object value) throws ParseException, IOException
Receive notification of the JSON primitive values: java.lang.String, java.lang.Number, java.lang.Boolean null- Parameters:
 value- - Instance of the following: java.lang.String, java.lang.Number, java.lang.Boolean null- Returns:
 - false if the handler wants to stop parsing after return.
 - Throws:
 ParseExceptionIOException
 
 - 
 
 -