Package net.minidev.json.parser
Class ContentHandlerDumy
- java.lang.Object
-
- net.minidev.json.parser.ContentHandlerDumy
-
- All Implemented Interfaces:
ContentHandler
public class ContentHandlerDumy extends Object implements ContentHandler
-
-
Field Summary
Fields Modifier and Type Field Description static ContentHandlerDumyHANDLER
-
Constructor Summary
Constructors Constructor Description ContentHandlerDumy()
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
HANDLER
public static ContentHandlerDumy HANDLER
-
-
Method Detail
-
startJSON
public void startJSON() throws ParseExceptionDescription copied from interface:ContentHandlerReceive notification of the beginning of JSON processing. The parser will invoke this method only once.- Specified by:
startJSONin interfaceContentHandler- Throws:
ParseException- - JSONParser will stop and throw the same exception to the caller when receiving this exception.
-
endJSON
public void endJSON() throws ParseExceptionDescription copied from interface:ContentHandlerReceive notification of the end of JSON processing.- Specified by:
endJSONin interfaceContentHandler- Throws:
ParseException
-
startObject
public boolean startObject() throws ParseException, IOExceptionDescription copied from interface:ContentHandlerReceive notification of the beginning of a JSON object.- Specified by:
startObjectin interfaceContentHandler- 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:
ContentHandler.endJSON()
-
endObject
public boolean endObject() throws ParseExceptionDescription copied from interface:ContentHandlerReceive notification of the end of a JSON object.- Specified by:
endObjectin interfaceContentHandler- Returns:
- false if the handler wants to stop parsing after return.
- Throws:
ParseException- See Also:
ContentHandler.startObject()
-
startObjectEntry
public boolean startObjectEntry(String key) throws ParseException
Description copied from interface:ContentHandlerReceive notification of the beginning of a JSON object entry.- Specified by:
startObjectEntryin interfaceContentHandler- Parameters:
key- - Key of a JSON object entry.- Returns:
- false if the handler wants to stop parsing after return.
- Throws:
ParseException- See Also:
ContentHandler.endObjectEntry()
-
endObjectEntry
public boolean endObjectEntry() throws ParseExceptionDescription copied from interface:ContentHandlerReceive notification of the end of the value of previous object entry.- Specified by:
endObjectEntryin interfaceContentHandler- Returns:
- false if the handler wants to stop parsing after return.
- Throws:
ParseException- See Also:
ContentHandler.startObjectEntry(java.lang.String)
-
startArray
public boolean startArray() throws ParseExceptionDescription copied from interface:ContentHandlerReceive notification of the beginning of a JSON array.- Specified by:
startArrayin interfaceContentHandler- Returns:
- false if the handler wants to stop parsing after return.
- Throws:
ParseException- See Also:
ContentHandler.endArray()
-
endArray
public boolean endArray() throws ParseExceptionDescription copied from interface:ContentHandlerReceive notification of the end of a JSON array.- Specified by:
endArrayin interfaceContentHandler- Returns:
- false if the handler wants to stop parsing after return.
- Throws:
ParseException- See Also:
ContentHandler.startArray()
-
primitive
public boolean primitive(Object value) throws ParseException
Description copied from interface:ContentHandlerReceive notification of the JSON primitive values: java.lang.String, java.lang.Number, java.lang.Boolean null- Specified by:
primitivein interfaceContentHandler- 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
-
-