Package net.minidev.json.parser
Class JSONParserString
- java.lang.Object
-
- net.minidev.json.parser.JSONParserBase
-
- net.minidev.json.parser.JSONParserMemory
-
- net.minidev.json.parser.JSONParserString
-
class JSONParserString extends JSONParserMemory
Parser for JSON text. Please note that JSONParser is NOT thread-safe.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minidev.json.parser.JSONParserBase
JSONParserBase.MSB
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
in
-
Fields inherited from class net.minidev.json.parser.JSONParserMemory
len
-
Fields inherited from class net.minidev.json.parser.JSONParserBase
acceptLeadinZero, acceptNaN, acceptNonQuote, acceptSimpleQuote, acceptUselessComma, base, c, checkTaillingData, checkTaillingSpace, EOI, ignoreControlChar, MAX_STOP, pos, sb, stopAll, stopArray, stopKey, stopValue, stopX, useHiPrecisionFloat, useIntegerStorage, xo, xs
-
-
Constructor Summary
Constructors Constructor Description JSONParserString(int permissiveMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
extractString(int beginIndex, int endIndex)
protected void
extractStringTrim(int start, int stop)
protected int
indexOf(char c, int pos)
java.lang.Object
parse(java.lang.String in)
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory<T> T
parse(java.lang.String in, JsonReaderI<T> mapper)
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryprotected void
read()
Read next char or END OF INPUTprotected void
readNoEnd()
read data can not be EOIprotected void
readS()
Same as read() in memory parsing-
Methods inherited from class net.minidev.json.parser.JSONParserMemory
readNQString, readNumber, readString
-
Methods inherited from class net.minidev.json.parser.JSONParserBase
checkControleChar, checkLeadinZero, extractFloat, parse, parseNumber, readArray, readFirst, readMain, readObject, readString2, readUnicode, skipDigits, skipNQString, skipSpace
-
-
-
-
Method Detail
-
parse
public java.lang.Object parse(java.lang.String in) throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
public <T> T parse(java.lang.String in, JsonReaderI<T> mapper) throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
extractString
protected void extractString(int beginIndex, int endIndex)
- Specified by:
extractString
in classJSONParserMemory
-
extractStringTrim
protected void extractStringTrim(int start, int stop)
- Specified by:
extractStringTrim
in classJSONParserMemory
-
indexOf
protected int indexOf(char c, int pos)
- Specified by:
indexOf
in classJSONParserMemory
-
read
protected void read()
Read next char or END OF INPUT- Specified by:
read
in classJSONParserBase
-
readS
protected void readS()
Same as read() in memory parsing- Specified by:
readS
in classJSONParserBase
-
readNoEnd
protected void readNoEnd() throws ParseException
read data can not be EOI- Specified by:
readNoEnd
in classJSONParserBase
- Throws:
ParseException
-
-