public class JSONParser extends ReaderTokenizerBase
T_BASE_LAST, T_COMMENT, T_EOF, T_IDENT, T_IPADDR, T_NUMBER, T_STRING| Constructor and Description |
|---|
JSONParser(Reader r) |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args) |
Object |
parse() |
Object |
parseItem()
Parse the JSON input and return a JSON data structure.
|
static Object |
parseJSON(Reader in)
Parse the input stream as a JSON structure.
|
static Object |
parseJSON(Reader r,
Class<?> totype)
Parse the input stream as a JSON object, and try to assign it's content to
the specified class.
|
static Object |
parseJSON(String in)
Parse the string as a JSON structure.
|
static Object |
parseJSON(String in,
Class<?> totype)
Parse the input, and try to assign the JSON input to a created
instance of the specified class.
|
protected int |
scanString()
Override to scan Javascript string constants.
|
getLastToken, getTokenString, isKeepQuotes, nextToken, scanToken, setKeepQuotes, setReturnComment, setReturnNewline, setReturnWhitespace, setScanUndottedNumberserror, getSourceLocation, getTokenColumn, getTokenLine, isAllowNewlineInString, isIdChar, isIdStart, scanIdentifier, scanNumber, scanSimpleString, scanUndottedNumber, setAllowNewlineInString, skipWs, skipWsNoNL, startToken, tokenStringaccept, accept, append, append, clearCopy, copy, copy, getCopied, getCurrentColumn, getCurrentLine, getSource, LA, LA, sbpublic JSONParser(Reader r)
protected int scanString()
throws IOException
scanString in class ReaderTokenizerBaseIOExceptionReaderTokenizerBase.scanString()public Object parseItem() throws Exception
Exceptionpublic static Object parseJSON(String in, Class<?> totype) throws Exception
Exceptionpublic static Object parseJSON(Reader r, Class<?> totype) throws Exception
r - totype - Exceptionpublic static Object parseJSON(String in) throws Exception
Exceptionpublic static Object parseJSON(Reader in) throws Exception
Exceptionpublic static void main(String[] args)
Copyright © 2017 etc.to. All rights reserved.