Package org.apache.groovy.json.internal
Class JsonParserUsingCharacterSource
- java.lang.Object
-
- org.apache.groovy.json.internal.BaseJsonParser
-
- org.apache.groovy.json.internal.JsonParserUsingCharacterSource
-
- All Implemented Interfaces:
JsonParser
public class JsonParserUsingCharacterSource extends BaseJsonParser
Converts an input JSON String into Java objects works with String or char array as input. Produces an Object which can be any of the basic JSON types mapped to Java.
-
-
Field Summary
Fields Modifier and Type Field Description protected static char[]
FALSE
protected static char[]
NULL
protected static char[]
TRUE
-
Fields inherited from class org.apache.groovy.json.internal.BaseJsonParser
ALPHA_0, ALPHA_1, ALPHA_2, ALPHA_3, ALPHA_4, ALPHA_5, ALPHA_6, ALPHA_7, ALPHA_8, ALPHA_9, bufSize, charset, CLOSED_BRACKET, CLOSED_CURLY, COLON, COMMA, DECIMAL_POINT, DOUBLE_QUOTE, ESCAPE, internedKeysCache, internKeys, LETTER_BIG_E, LETTER_E, MINUS, PLUS
-
-
Constructor Summary
Constructors Constructor Description JsonParserUsingCharacterSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
complain(String complaint)
protected boolean
decodeFalse()
protected List
decodeJsonArray()
protected Object
decodeJsonObject()
protected Object
decodeNull()
protected boolean
decodeTrue()
protected String
exceptionDetails(String message)
Object
parse(char[] chars)
Object
parse(Reader reader)
-
Methods inherited from class org.apache.groovy.json.internal.BaseJsonParser
charDescription, findEndQuote, hasEscapeChar, isDecimalChar, isDelimiter, isDoubleQuote, isEscape, isNumberDigit, parse, parse, parse, parse, parse, parse, parse, setCharset
-
-
-
-
Method Detail
-
decodeJsonObject
protected final Object decodeJsonObject()
-
complain
protected final void complain(String complaint)
-
decodeNull
protected final Object decodeNull()
-
decodeTrue
protected final boolean decodeTrue()
-
decodeFalse
protected final boolean decodeFalse()
-
decodeJsonArray
protected final List decodeJsonArray()
-
parse
public Object parse(Reader reader)
- Specified by:
parse
in interfaceJsonParser
- Overrides:
parse
in classBaseJsonParser
-
parse
public Object parse(char[] chars)
-
-