org.elkoserver.json
Class Parser
java.lang.Object
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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().
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