public class JSONParser
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private boolean |
active |
(package private) static int |
AFTER_NAME |
(package private) static int |
AFTER_ROOT |
(package private) static int |
AFTER_VALUE |
(package private) static int |
BEFORE_NAME |
(package private) static int |
BEFORE_ROOT |
(package private) static int |
BEFORE_VALUE |
private LocalCache |
cache |
private static int[] |
ESCAPE_CHARS |
private boolean |
first |
private boolean |
ignoreWhirespace |
private InputSource |
in |
private boolean |
interpretterMode |
private int |
maxDepth |
private java.util.List<JSONEventType> |
stack |
private int |
state |
private JSONEventType |
type |
private java.lang.Object |
value |
| Constructor and Description |
|---|
JSONParser(InputSource in,
int maxDepth,
boolean interpretterMode,
boolean ignoreWhirespace,
LocalCache cache) |
| Modifier and Type | Method and Description |
|---|---|
(package private) int |
afterName() |
(package private) int |
afterRoot() |
(package private) int |
afterValue() |
(package private) int |
beforeName() |
(package private) int |
beforeRoot() |
(package private) int |
beforeValue() |
(package private) JSONException |
createParseException(InputSource in,
java.lang.String id) |
(package private) JSONException |
createParseException(InputSource in,
java.lang.String id,
java.lang.Object... args) |
(package private) JSONEventType |
getBeginType() |
int |
getDepth() |
int |
getMaxDepth() |
(package private) JSONEventType |
getType() |
java.lang.Object |
getValue() |
(package private) boolean |
isFirst() |
boolean |
isIgnoreWhitespace() |
boolean |
isInterpretterMode() |
JSONEventType |
next() |
(package private) java.lang.String |
parseComment(InputSource in) |
(package private) char |
parseEscape(InputSource in) |
(package private) java.lang.Object |
parseLiteral(InputSource in,
boolean asValue) |
(package private) java.lang.Object |
parseLiteral(InputSource in,
java.lang.String expected,
java.lang.Object result) |
(package private) java.lang.Object |
parseNumber(InputSource in) |
(package private) java.lang.Object |
parseString(InputSource in,
boolean any) |
(package private) java.lang.String |
parseWhitespace(InputSource in) |
(package private) void |
pop() |
(package private) void |
push(JSONEventType type) |
(package private) void |
set(JSONEventType type,
java.lang.Object value,
boolean isValue) |
static final int BEFORE_ROOT
static final int AFTER_ROOT
static final int BEFORE_NAME
static final int AFTER_NAME
static final int BEFORE_VALUE
static final int AFTER_VALUE
private static final int[] ESCAPE_CHARS
private InputSource in
private int maxDepth
private boolean interpretterMode
private boolean ignoreWhirespace
private LocalCache cache
private int state
private java.util.List<JSONEventType> stack
private JSONEventType type
private java.lang.Object value
private boolean first
private boolean active
public JSONParser(InputSource in, int maxDepth, boolean interpretterMode, boolean ignoreWhirespace, LocalCache cache)
public int getMaxDepth()
public boolean isInterpretterMode()
public boolean isIgnoreWhitespace()
public java.lang.Object getValue()
public int getDepth()
public JSONEventType next() throws java.io.IOException
java.io.IOExceptionint beforeRoot()
throws java.io.IOException
java.io.IOExceptionint afterRoot()
throws java.io.IOException
java.io.IOExceptionint beforeName()
throws java.io.IOException
java.io.IOExceptionint afterName()
throws java.io.IOException
java.io.IOExceptionint beforeValue()
throws java.io.IOException
java.io.IOExceptionint afterValue()
throws java.io.IOException
java.io.IOExceptionvoid push(JSONEventType type)
void set(JSONEventType type, java.lang.Object value, boolean isValue)
void pop()
JSONEventType getBeginType()
JSONEventType getType()
boolean isFirst()
java.lang.Object parseString(InputSource in, boolean any) throws java.io.IOException
java.io.IOExceptionchar parseEscape(InputSource in) throws java.io.IOException
java.io.IOExceptionjava.lang.Object parseNumber(InputSource in) throws java.io.IOException
java.io.IOExceptionjava.lang.Object parseLiteral(InputSource in, java.lang.String expected, java.lang.Object result) throws java.io.IOException
java.io.IOExceptionjava.lang.Object parseLiteral(InputSource in, boolean asValue) throws java.io.IOException
java.io.IOExceptionjava.lang.String parseComment(InputSource in) throws java.io.IOException
java.io.IOExceptionjava.lang.String parseWhitespace(InputSource in) throws java.io.IOException
java.io.IOExceptionJSONException createParseException(InputSource in, java.lang.String id)
JSONException createParseException(InputSource in, java.lang.String id, java.lang.Object... args)