org.elkoserver.json
Class Parser

java.lang.Object
  extended by org.elkoserver.json.Parser

public class Parser
extends Object

Parser to translate JSON strings into JSON objects.


Constructor Summary
Parser(String inbuf)
          Create a parser to parse a string.
 
Method Summary
 JSONObject parseObjectLiteral()
          Parse the next unparsed JSON object in the input string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser(String inbuf)
Create a parser to parse a string.

Parameters:
inbuf - The JSON string to be parsed. The string may contain multiple JSON objects, one of which will be returned by each successive call to parseObjectLiteral().
Method Detail

parseObjectLiteral

public JSONObject parseObjectLiteral()
                              throws SyntaxError
Parse the next unparsed JSON object in the input string.

Returns:
the next JSONObject in the string being scanned, or null if the end of the string has been reached.
Throws:
SyntaxError