Method: Oj.sc_parse
- Defined in:
.sc_parse(handler, io) ⇒ Object
Parses an IO stream or file containing a JSON document. Raises an exception if the JSON is malformed. This is a callback parser (Simple Callback Parser) that calls the methods in the handler if they exist. A sample is the Oj::ScHandler class which can be used as a base class for the handler. This callback parser is slightly more efficient than the Saj callback parser and requires less argument checking.
-
handler [Oj::ScHandler_] responds to Oj::ScHandler methods
-
io [IO_|String] IO Object to read from