public interface

ContentHandler

com.pnfsoftware.jeb.util.encoding.json.parser.ContentHandler

Class Overview

A simplified and stoppable SAX-like content handler for stream processing of JSON text.

See Also

Summary

Public Methods
abstract boolean endArray()
Receive notification of the end of a JSON array.
abstract void endJSON()
Receive notification of the end of JSON processing.
abstract boolean endObject()
Receive notification of the end of a JSON object.
abstract boolean endObjectEntry()
Receive notification of the end of the value of previous object entry.
abstract boolean primitive(Object value)
Receive notification of the JSON primitive values: java.lang.String, java.lang.Number, java.lang.Boolean null
abstract boolean startArray()
Receive notification of the beginning of a JSON array.
abstract void startJSON()
Receive notification of the beginning of JSON processing.
abstract boolean startObject()
Receive notification of the beginning of a JSON object.
abstract boolean startObjectEntry(String key)
Receive notification of the beginning of a JSON object entry.

Public Methods

public abstract boolean endArray ()

Receive notification of the end of a JSON array.

Returns
  • false if the handler wants to stop parsing after return.
Throws
ParseException
IOException
ParseException
See Also

public abstract void endJSON ()

Receive notification of the end of JSON processing.

Throws
ParseException
IOException

public abstract boolean endObject ()

Receive notification of the end of a JSON object.

Returns
  • false if the handler wants to stop parsing after return.
Throws
ParseException
IOException
ParseException
See Also

public abstract boolean endObjectEntry ()

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
IOException
ParseException

public abstract boolean primitive (Object value)

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
IOException

public abstract boolean startArray ()

Receive notification of the beginning of a JSON array.

Returns
  • false if the handler wants to stop parsing after return.
Throws
ParseException
IOException
ParseException
See Also

public abstract void startJSON ()

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.
IOException

public abstract boolean startObject ()

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.
IOException
See Also

public abstract boolean startObjectEntry (String key)

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
IOException
ParseException
See Also