Package net.minidev.json.parser
Class JSONParserBase
java.lang.Object
net.minidev.json.parser.JSONParserBase
- Direct Known Subclasses:
JSONParserMemory,JSONParserStream
JSONParserBase is the common code between
JSONParserString and JSONParserReader- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final boolean(package private) JsonReaderprotected charprotected final booleanprotected final booleanprotected intstatic final byteprotected final booleanprivate Stringprotected final booleanstatic final inthard coded maximal depth for JSON parsingprotected static final charprotected intprotected final booleanprotected final JSONParserBase.MSBprotected static boolean[]protected static boolean[]protected static boolean[]protected static boolean[]protected static boolean[]protected final booleanprotected final booleanprotected final booleanprotected Objectprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprivate booleancompareDoublePrecision(String convert, String origin) protected Numberprotected booleanhasNext()protected <T> Tparse(JsonReaderI<T> mapper) parse from the first position
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryprivate <T> TparseInner(JsonReaderI<T> mapper) parse from the last position
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryprotected <T> TparseNext(JsonReaderI<T> mapper) parse from the current position
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryprotected Numberprotected abstract voidread()protected <T> TreadArray(JsonReaderI<T> mapper) protected <T> TreadFirst(JsonReaderI<T> mapper) use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryprotected ObjectreadMain(JsonReaderI<?> mapper, boolean[] stop) use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryprotected abstract voidprotected abstract voidreadNQString(boolean[] stop) protected abstract ObjectreadNumber(boolean[] stop) protected <T> TreadObject(JsonReaderI<T> mapper) (package private) abstract voidreadS()store and readprotected abstract voidprotected voidprotected charreadUnicode(int totalChars) protected voidprotected voidskipNQString(boolean[] stop) protected void
-
Field Details
-
c
protected char c -
MAX_DEPTH
public static final int MAX_DEPTHhard coded maximal depth for JSON parsing- See Also:
-
depth
protected int depth -
base
JsonReader base -
EOI
public static final byte EOI- See Also:
-
MAX_STOP
protected static final char MAX_STOP- See Also:
-
lastKey
-
stopAll
protected static boolean[] stopAll -
stopArray
protected static boolean[] stopArray -
stopKey
protected static boolean[] stopKey -
stopValue
protected static boolean[] stopValue -
stopX
protected static boolean[] stopX -
sb
-
xo
-
xs
-
pos
protected int pos -
acceptLeadinZero
protected final boolean acceptLeadinZero -
acceptNaN
protected final boolean acceptNaN -
acceptNonQuote
protected final boolean acceptNonQuote -
acceptSimpleQuote
protected final boolean acceptSimpleQuote -
acceptUselessComma
protected final boolean acceptUselessComma -
checkTaillingData
protected final boolean checkTaillingData -
checkTaillingSpace
protected final boolean checkTaillingSpace -
ignoreControlChar
protected final boolean ignoreControlChar -
useHiPrecisionFloat
protected final boolean useHiPrecisionFloat -
useIntegerStorage
protected final boolean useIntegerStorage -
reject127
protected final boolean reject127 -
unrestictBigDigit
protected final boolean unrestictBigDigit -
limitJsonDepth
protected final boolean limitJsonDepth -
acceptIncomplete
protected final boolean acceptIncomplete
-
-
Constructor Details
-
JSONParserBase
public JSONParserBase(int permissiveMode)
-
-
Method Details
-
checkControleChar
- Throws:
ParseException
-
checkLeadinZero
- Throws:
ParseException
-
extractFloat
- Throws:
ParseException
-
compareDoublePrecision
-
hasNext
protected boolean hasNext() -
parse
parse from the first position
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parseNext
parse from the current position
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parseInner
parse from the last position
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parseNumber
- Throws:
ParseException
-
read
- Throws:
IOException
-
readArray
- Throws:
ParseExceptionIOException
-
readFirst
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseExceptionIOException
-
readMain
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseExceptionIOException
-
readNoEnd
- Throws:
ParseExceptionIOException
-
readNQString
- Throws:
IOException
-
readNumber
- Throws:
ParseExceptionIOException
-
readObject
- Throws:
ParseExceptionIOException
-
readS
store and read- Throws:
IOException
-
readString
- Throws:
ParseExceptionIOException
-
readString2
- Throws:
ParseExceptionIOException
-
readUnicode
- Throws:
ParseExceptionIOException
-
skipDigits
- Throws:
IOException
-
skipNQString
- Throws:
IOException
-
skipSpace
- Throws:
IOException
-