Package org.json.simple.parser
Interface ContentHandler
-
@Deprecated public interface ContentHandler
Deprecated.since 2.0.0 it doesn't extend the SAX ContentHandler promoting bad practices and incompatible code.A simplified and stoppable SAX-like content handler for stream processing of JSON text.- Author:
- FangYidong<fangyidong@yahoo.com.cn>
- See Also:
JSONParser.parse(java.io.Reader, ContentHandler, boolean)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanendArray()Deprecated.Receive notification of the end of a JSON array.voidendJSON()Deprecated.Receive notification of the end of JSON processing.booleanendObject()Deprecated.Receive notification of the end of a JSON object.booleanendObjectEntry()Deprecated.Receive notification of the end of the value of previous object entry.booleanprimitive(java.lang.Object value)Deprecated.Receive notification of the JSON primitive values: java.lang.String, java.lang.Number, java.lang.Boolean nullbooleanstartArray()Deprecated.Receive notification of the beginning of a JSON array.voidstartJSON()Deprecated.Receive notification of the beginning of JSON processing.booleanstartObject()Deprecated.Receive notification of the beginning of a JSON object.booleanstartObjectEntry(java.lang.String key)Deprecated.Receive notification of the beginning of a JSON object entry.
-
-
-
Method Detail
-
startJSON
void startJSON() throws ParseException, java.io.IOException
Deprecated.Receive 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.java.io.IOException- description omitted.
-
endJSON
void endJSON() throws ParseException, java.io.IOException
Deprecated.Receive notification of the end of JSON processing.- Throws:
ParseException- description omitted.java.io.IOException- description omitted.
-
startObject
boolean startObject() throws ParseException, java.io.IOException
Deprecated.Receive 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.java.io.IOException- description omitted.- See Also:
endJSON()
-
endObject
boolean endObject() throws ParseException, java.io.IOException
Deprecated.Receive notification of the end of a JSON object.- Returns:
- false if the handler wants to stop parsing after return.
- Throws:
ParseException- description omitted.java.io.IOException- description omitted.- See Also:
startObject()
-
startObjectEntry
boolean startObjectEntry(java.lang.String key) throws ParseException, java.io.IOException
Deprecated.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:
ParseException- description omitted.java.io.IOException- description omitted.- See Also:
endObjectEntry()
-
endObjectEntry
boolean endObjectEntry() throws ParseException, java.io.IOException
Deprecated.Receive notification of the end of the value of previous object entry.- Returns:
- false if the handler wants to stop parsing after return.
- Throws:
ParseException- description omitted.java.io.IOException- description omitted.- See Also:
startObjectEntry(java.lang.String)
-
startArray
boolean startArray() throws ParseException, java.io.IOException
Deprecated.Receive notification of the beginning of a JSON array.- Returns:
- false if the handler wants to stop parsing after return.
- Throws:
ParseException- description omitted.java.io.IOException- description omitted.- See Also:
endArray()
-
endArray
boolean endArray() throws ParseException, java.io.IOException
Deprecated.Receive notification of the end of a JSON array.- Returns:
- false if the handler wants to stop parsing after return.
- Throws:
ParseException- description omitted.java.io.IOException- description omitted.- See Also:
startArray()
-
primitive
boolean primitive(java.lang.Object value) throws ParseException, java.io.IOException
Deprecated.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:
ParseException- description omitted.java.io.IOException- description omitted.
-
-