Package org.apache.groovy.json.internal
Class BaseJsonParser
java.lang.Object
org.apache.groovy.json.internal.BaseJsonParser
- All Implemented Interfaces:
- JsonParser
- Direct Known Subclasses:
- JsonParserCharArray,- JsonParserUsingCharacterSource
public abstract class BaseJsonParser extends java.lang.Object implements JsonParser
Base JSON parser.
 Scaled down version of Boon JsonParser with features
 removed that are JDK 1.7 dependent or Groovy duplicated functionality.
- 
Field SummaryFields Modifier and Type Field Description protected static intALPHA_0protected static intALPHA_1protected static intALPHA_2protected static intALPHA_3protected static intALPHA_4protected static intALPHA_5protected static intALPHA_6protected static intALPHA_7protected static intALPHA_8protected static intALPHA_9protected intbufSizeprotected java.lang.Stringcharsetprotected static intCLOSED_BRACKETprotected static intCLOSED_CURLYprotected static intCOLONprotected static intCOMMAprotected static intDECIMAL_POINTprotected static intDOUBLE_QUOTEprotected static intESCAPEprotected static java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String>internedKeysCacheprotected static booleaninternKeysprotected static intLETTER_BIG_Eprotected static intLETTER_Eprotected static intMINUSprotected static intPLUS
- 
Constructor SummaryConstructors Constructor Description BaseJsonParser()
- 
Method SummaryModifier and Type Method Description protected java.lang.StringcharDescription(int c)protected static intfindEndQuote(char[] array, int index)protected static booleanhasEscapeChar(char[] array, int index, int[] indexHolder)protected static booleanisDecimalChar(int currentChar)protected static booleanisDelimiter(int c)protected static booleanisDoubleQuote(int c)protected static booleanisEscape(int c)protected static booleanisNumberDigit(int c)java.lang.Objectparse(byte[] bytes)java.lang.Objectparse(byte[] bytes, java.lang.String charset)java.lang.Objectparse(java.io.File file, java.lang.String charset)java.lang.Objectparse(java.io.InputStream input)java.lang.Objectparse(java.io.InputStream input, java.lang.String charset)java.lang.Objectparse(java.io.Reader reader)java.lang.Objectparse(java.lang.CharSequence charSequence)java.lang.Objectparse(java.lang.String jsonString)voidsetCharset(java.lang.String charset)Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface groovy.json.JsonParserparse
- 
Field Details- 
COLONprotected static final int COLON- See Also:
- Constant Field Values
 
- 
COMMAprotected static final int COMMA- See Also:
- Constant Field Values
 
- 
CLOSED_CURLYprotected static final int CLOSED_CURLY- See Also:
- Constant Field Values
 
- 
CLOSED_BRACKETprotected static final int CLOSED_BRACKET- See Also:
- Constant Field Values
 
- 
LETTER_Eprotected static final int LETTER_E- See Also:
- Constant Field Values
 
- 
LETTER_BIG_Eprotected static final int LETTER_BIG_E- See Also:
- Constant Field Values
 
- 
MINUSprotected static final int MINUS- See Also:
- Constant Field Values
 
- 
PLUSprotected static final int PLUS- See Also:
- Constant Field Values
 
- 
DECIMAL_POINTprotected static final int DECIMAL_POINT- See Also:
- Constant Field Values
 
- 
ALPHA_0protected static final int ALPHA_0- See Also:
- Constant Field Values
 
- 
ALPHA_1protected static final int ALPHA_1- See Also:
- Constant Field Values
 
- 
ALPHA_2protected static final int ALPHA_2- See Also:
- Constant Field Values
 
- 
ALPHA_3protected static final int ALPHA_3- See Also:
- Constant Field Values
 
- 
ALPHA_4protected static final int ALPHA_4- See Also:
- Constant Field Values
 
- 
ALPHA_5protected static final int ALPHA_5- See Also:
- Constant Field Values
 
- 
ALPHA_6protected static final int ALPHA_6- See Also:
- Constant Field Values
 
- 
ALPHA_7protected static final int ALPHA_7- See Also:
- Constant Field Values
 
- 
ALPHA_8protected static final int ALPHA_8- See Also:
- Constant Field Values
 
- 
ALPHA_9protected static final int ALPHA_9- See Also:
- Constant Field Values
 
- 
DOUBLE_QUOTEprotected static final int DOUBLE_QUOTE- See Also:
- Constant Field Values
 
- 
ESCAPEprotected static final int ESCAPE- See Also:
- Constant Field Values
 
- 
internKeysprotected static final boolean internKeys
- 
internedKeysCacheprotected static final java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String> internedKeysCache
- 
charsetprotected java.lang.String charset
- 
bufSizeprotected int bufSize
 
- 
- 
Constructor Details- 
BaseJsonParserpublic BaseJsonParser()
 
- 
- 
Method Details- 
charDescriptionprotected java.lang.String charDescription(int c)
- 
setCharsetpublic void setCharset(java.lang.String charset)
- 
parsepublic java.lang.Object parse(java.lang.String jsonString)- Specified by:
- parsein interface- JsonParser
 
- 
parsepublic java.lang.Object parse(byte[] bytes)- Specified by:
- parsein interface- JsonParser
 
- 
parsepublic java.lang.Object parse(byte[] bytes, java.lang.String charset)- Specified by:
- parsein interface- JsonParser
 
- 
parsepublic java.lang.Object parse(java.lang.CharSequence charSequence)- Specified by:
- parsein interface- JsonParser
 
- 
parsepublic java.lang.Object parse(java.io.Reader reader)- Specified by:
- parsein interface- JsonParser
 
- 
parsepublic java.lang.Object parse(java.io.InputStream input)- Specified by:
- parsein interface- JsonParser
 
- 
parsepublic java.lang.Object parse(java.io.InputStream input, java.lang.String charset)- Specified by:
- parsein interface- JsonParser
 
- 
parsepublic java.lang.Object parse(java.io.File file, java.lang.String charset)- Specified by:
- parsein interface- JsonParser
 
- 
isDecimalCharprotected static boolean isDecimalChar(int currentChar)
- 
isDelimiterprotected static boolean isDelimiter(int c)
- 
isNumberDigitprotected static final boolean isNumberDigit(int c)
- 
isDoubleQuoteprotected static final boolean isDoubleQuote(int c)
- 
isEscapeprotected static final boolean isEscape(int c)
- 
hasEscapeCharprotected static boolean hasEscapeChar(char[] array, int index, int[] indexHolder)
- 
findEndQuoteprotected static int findEndQuote(char[] array, int index)
 
-