Method: Oj.saj_parse

Defined in:

.saj_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 that calls the methods in the handler if they exist. A sample is the Oj::Saj class which can be used as a base class for the handler.

  • handler [Oj::Saj] responds to Oj::Saj methods

  • io [IO|String] IO Object to read from