com.ibm.portal.streaming.json
Interface JSONReader


Deprecated. use JsonParserReader instead

@Deprecated
public interface JSONReader

Interface for reading a JSON document using callbacks.

Since:
7.0.0
See Also:
XMLReader

Method Summary
 JSONHandler getJSONHandler()
          Deprecated. Return the current JSON handler.
 void parse(JSONInputSource input)
          Deprecated. Parse a JSON document.
 void setJSONHandler(JSONHandler handler)
          Deprecated. Allow an application to register a json event handler.
 

Method Detail

parse

void parse(JSONInputSource input)
           throws java.io.IOException
Deprecated. 
Parse a JSON document.

The application can use this method to instruct the JSON reader to begin parsing a JSON document from any valid input source (e. g. a character stream).

Applications may not invoke this method while a parse is in progress (they should create a new JSONReader instead for each nested JSON document). Once a parse is complete, an application may reuse the same JSONReader object, possibly with a different input source.

During the parse, the JSONReader will provide information about the JSON document through the registered event handlers.

Parameters:
input - The input source for the top-level of the JSON document.
Throws:
java.io.IOException

setJSONHandler

void setJSONHandler(JSONHandler handler)
Deprecated. 
Allow an application to register a json event handler.

If the application does not register a content handler, all content events reported by the SAX parser will be silently ignored. Applications may register a new or different handler in the middle of a parse, and the JSON parser must begin using the new handler immediately.

Parameters:
handler - - The json handler.

getJSONHandler

JSONHandler getJSONHandler()
Deprecated. 
Return the current JSON handler.

Returns:
The current JSON handler, or null if none has been registered.