Package net.minidev.json.parser
Class JSONParserByteArray
- java.lang.Object
-
- net.minidev.json.parser.JSONParserBase
-
- net.minidev.json.parser.JSONParserMemory
-
- net.minidev.json.parser.JSONParserByteArray
-
class JSONParserByteArray extends JSONParserMemory
Parser for JSON text. Please note that JSONParser is NOT thread-safe.- Author:
- Uriel Chemouni uchemouni@gmail.com
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minidev.json.parser.JSONParserBase
JSONParserBase.MSB
-
-
Field Summary
-
Fields inherited from class net.minidev.json.parser.JSONParserMemory
len
-
Fields inherited from class net.minidev.json.parser.JSONParserBase
acceptLeadinZero, acceptNaN, acceptNonQuote, acceptSimpleQuote, acceptUselessComma, c, checkTaillingData, checkTaillingSpace, containerFactory, EOI, handler, ignoreControlChar, MAX_STOP, pos, sb, stopAll, stopArray, stopKey, stopValue, stopX, useHiPrecisionFloat, useIntegerStorage, xo, xs
-
-
Constructor Summary
Constructors Constructor Description JSONParserByteArray(int permissiveMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
extractString(int beginIndex, int endIndex)
protected int
indexOf(char c, int pos)
Object
parse(byte[] in)
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryObject
parse(byte[] in, int offset, int length, ContainerFactory containerFactory, ContentHandler handler)
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory Processing from offset position until lengthObject
parse(byte[] in, ContainerFactory containerFactory)
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryObject
parse(byte[] in, ContainerFactory containerFactory, ContentHandler handler)
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactoryprotected void
read()
Read one char in this.cprotected void
readNoEnd()
protected void
readS()
Same as read() in memory parsing-
Methods inherited from class net.minidev.json.parser.JSONParserMemory
extractStringTrim, readNQString, readNumber, readString
-
Methods inherited from class net.minidev.json.parser.JSONParserBase
checkControleChar, checkLeadinZero, extractFloat, parse, parseNumber, readArray, readMain, readObject, readString2, readUnicode, skipDigits, skipNQString, skipSpace
-
-
-
-
Method Detail
-
parse
public Object parse(byte[] in) throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
public Object parse(byte[] in, ContainerFactory containerFactory) throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
public Object parse(byte[] in, ContainerFactory containerFactory, ContentHandler handler) throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory- Throws:
ParseException
-
parse
public Object parse(byte[] in, int offset, int length, ContainerFactory containerFactory, ContentHandler handler) throws ParseException
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory Processing from offset position until length- Throws:
ParseException
-
extractString
protected void extractString(int beginIndex, int endIndex)
- Specified by:
extractString
in classJSONParserMemory
-
indexOf
protected int indexOf(char c, int pos)
- Specified by:
indexOf
in classJSONParserMemory
-
read
protected void read()
Description copied from class:JSONParserBase
Read one char in this.c- 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
- Specified by:
readNoEnd
in classJSONParserBase
- Throws:
ParseException
-
-