public class JSONParser extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
S_END |
static int |
S_IN_ARRAY |
static int |
S_IN_ERROR |
static int |
S_IN_FINISHED_VALUE |
static int |
S_IN_OBJECT |
static int |
S_IN_PAIR_VALUE |
static int |
S_INIT |
static int |
S_PASSED_PAIR_KEY |
| Constructor and Description |
|---|
JSONParser() |
| Modifier and Type | Method and Description |
|---|---|
static void |
escape(CharSequence s,
Writer sb)
Modified from JSONValue
|
int |
getPosition() |
void |
parse(Reader in,
ContentHandler contentHandler) |
void |
parse(Reader in,
ContentHandler contentHandler,
boolean isResume)
Stream processing of JSON text.
|
void |
parse(String s,
ContentHandler contentHandler) |
void |
parse(String s,
ContentHandler contentHandler,
boolean isResume) |
void |
reset()
Reset the parser to the initial state without resetting the underlying reader.
|
void |
reset(Reader in)
Reset the parser to the initial state with a new character reader.
|
public static final int S_INIT
public static final int S_IN_FINISHED_VALUE
public static final int S_IN_OBJECT
public static final int S_IN_ARRAY
public static final int S_PASSED_PAIR_KEY
public static final int S_IN_PAIR_VALUE
public static final int S_END
public static final int S_IN_ERROR
public static void escape(CharSequence s, Writer sb) throws IOException
s - - Must not be null.sb - IOExceptionpublic void reset()
public void reset(Reader in)
in - - The new character reader.IOExceptionParseExceptionpublic int getPosition()
public void parse(String s, ContentHandler contentHandler) throws ParseException
ParseExceptionpublic void parse(String s, ContentHandler contentHandler, boolean isResume) throws ParseException
ParseExceptionpublic void parse(Reader in, ContentHandler contentHandler) throws IOException, ParseException
IOExceptionParseExceptionpublic void parse(Reader in, ContentHandler contentHandler, boolean isResume) throws IOException, ParseException
in - contentHandler - isResume - - Indicates if it continues previous parsing operation.
If set to true, resume parsing the old stream, and parameter 'in' will be ignored.
If this method is called for the first time in this instance, isResume will be ignored.IOExceptionParseExceptionContentHandlerCopyright © 2018 JBoss by Red Hat. All rights reserved.