|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xerial.json.JSONPullParser
public class JSONPullParser
Pull Parser for JSON data
| Constructor Summary | |
|---|---|
|
JSONPullParser(InputStream jsonStream)
|
protected |
JSONPullParser(JSONLexer lexer)
|
|
JSONPullParser(JSONObject jsonObject)
|
|
JSONPullParser(Reader reader)
|
|
JSONPullParser(String jsonString)
|
| Method Summary | |
|---|---|
int |
getDepth()
|
String |
getKeyName()
Gets the current object/array/value key. |
String |
getText()
|
JSONValue |
getValue()
Reads the current JSONValue, which is one of JSONObject ,
JSONArray, JSONInteger, JSONDouble,
JSONString, JSONBoolean and JSONNull. |
JSONEvent |
next()
Reads the next JSONEvent |
protected JSONEvent |
reportEvent(org.antlr.runtime.Token token,
JSONEvent e)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSONPullParser(String jsonString)
public JSONPullParser(JSONObject jsonObject)
public JSONPullParser(InputStream jsonStream)
throws IOException
IOException
public JSONPullParser(Reader reader)
throws IOException
IOExceptionprotected JSONPullParser(JSONLexer lexer)
| Method Detail |
|---|
public JSONValue getValue()
throws JSONException
JSONObject ,
JSONArray, JSONInteger, JSONDouble,
JSONString, JSONBoolean and JSONNull. This
methods proceeds the parse state up to the end of the returned value.
JSONException - when the current token is not a JSONValue
public JSONEvent next()
throws JSONException
JSONEvent
JSONEvent. If no more token is available,
returns JSONEvent.EndJSON.
JSONException - when some syntax error is found.
protected JSONEvent reportEvent(org.antlr.runtime.Token token,
JSONEvent e)
public String getKeyName()
throws JSONException
JSONExceptionpublic String getText()
public int getDepth()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
