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 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 Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected static int` | `ALPHA_0` |
    `protected static int` | `ALPHA_1` |
    `protected static int` | `ALPHA_2` |
    `protected static int` | `ALPHA_3` |
    `protected static int` | `ALPHA_4` |
    `protected static int` | `ALPHA_5` |
    `protected static int` | `ALPHA_6` |
    `protected static int` | `ALPHA_7` |
    `protected static int` | `ALPHA_8` |
    `protected static int` | `ALPHA_9` |
    `protected int` | `bufSize` |
    `protected String` | `charset` |
    `protected static int` | `CLOSED_BRACKET` |
    `protected static int` | `CLOSED_CURLY` |
    `protected static int` | `COLON` |
    `protected static int` | `COMMA` |
    `protected static int` | `DECIMAL_POINT` |
    `protected static int` | `DOUBLE_QUOTE` |
    `protected static int` | `ESCAPE` |
    `protected static ConcurrentHashMap<String,​String>` | `internedKeysCache` |
    `protected static boolean` | `internKeys` |
    `protected static int` | `LETTER_BIG_E` |
    `protected static int` | `LETTER_E` |
    `protected static int` | `MINUS` |
    `protected static int` | `PLUS` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BaseJsonParser()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected String` | `charDescription​(int c)` |
    `protected static int` | `findEndQuote​(char[] array, int index)` |
    `protected static boolean` | `hasEscapeChar​(char[] array, int index, int[] indexHolder)` |
    `protected static boolean` | `isDecimalChar​(int currentChar)` |
    `protected static boolean` | `isDelimiter​(int c)` |
    `protected static boolean` | `isDoubleQuote​(int c)` |
    `protected static boolean` | `isEscape​(int c)` |
    `protected static boolean` | `isNumberDigit​(int c)` |
    `Object` | `parse​(byte[] bytes)` |
    `Object` | `parse​(byte[] bytes, String charset)` |
    `Object` | `parse​(File file, String charset)` |
    `Object` | `parse​(InputStream input)` |
    `Object` | `parse​(InputStream input, String charset)` |
    `Object` | `parse​(Reader reader)` |
    `Object` | `parse​(CharSequence charSequence)` |
    `Object` | `parse​(String jsonString)` |
    `void` | `setCharset​(String charset)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface groovy.json.JsonParser

      `parse`

- - ### Field Detail

    - #### COLON

          protected static final int COLON

      See Also:
        Constant Field Values

    - #### COMMA

          protected static final int COMMA

      See Also:
        Constant Field Values

    - #### CLOSED_CURLY

          protected static final int CLOSED_CURLY

      See Also:
        Constant Field Values

    - #### CLOSED_BRACKET

          protected static final int CLOSED_BRACKET

      See Also:
        Constant Field Values

    - #### LETTER_E

          protected static final int LETTER_E

      See Also:
        Constant Field Values

    - #### LETTER_BIG_E

          protected static final int LETTER_BIG_E

      See Also:
        Constant Field Values

    - #### MINUS

          protected static final int MINUS

      See Also:
        Constant Field Values

    - #### PLUS

          protected static final int PLUS

      See Also:
        Constant Field Values

    - #### DECIMAL_POINT

          protected static final int DECIMAL_POINT

      See Also:
        Constant Field Values

    - #### ALPHA_0

          protected static final int ALPHA_0

      See Also:
        Constant Field Values

    - #### ALPHA_1

          protected static final int ALPHA_1

      See Also:
        Constant Field Values

    - #### ALPHA_2

          protected static final int ALPHA_2

      See Also:
        Constant Field Values

    - #### ALPHA_3

          protected static final int ALPHA_3

      See Also:
        Constant Field Values

    - #### ALPHA_4

          protected static final int ALPHA_4

      See Also:
        Constant Field Values

    - #### ALPHA_5

          protected static final int ALPHA_5

      See Also:
        Constant Field Values

    - #### ALPHA_6

          protected static final int ALPHA_6

      See Also:
        Constant Field Values

    - #### ALPHA_7

          protected static final int ALPHA_7

      See Also:
        Constant Field Values

    - #### ALPHA_8

          protected static final int ALPHA_8

      See Also:
        Constant Field Values

    - #### ALPHA_9

          protected static final int ALPHA_9

      See Also:
        Constant Field Values

    - #### DOUBLE_QUOTE

          protected static final int DOUBLE_QUOTE

      See Also:
        Constant Field Values

    - #### ESCAPE

          protected static final int ESCAPE

      See Also:
        Constant Field Values

    - #### internKeys

          protected static final boolean internKeys

    - #### internedKeysCache

          protected static ConcurrentHashMap<String,​String> internedKeysCache

    - #### charset

          protected String charset

    - #### bufSize

          protected int bufSize

  - ### Constructor Detail

    - #### BaseJsonParser

          public BaseJsonParser()

  - ### Method Detail

    - #### charDescription

          protected String charDescription​(int c)

    - #### setCharset

          public void setCharset​(String charset)

    - #### parse

          public Object parse​(String jsonString)

      Specified by:
        `parse` in interface `JsonParser`

    - #### parse

          public Object parse​(byte[] bytes)

      Specified by:
        `parse` in interface `JsonParser`

    - #### parse

          public Object parse​(byte[] bytes,
                              String charset)

      Specified by:
        `parse` in interface `JsonParser`

    - #### parse

          public Object parse​(CharSequence charSequence)

      Specified by:
        `parse` in interface `JsonParser`

    - #### parse

          public Object parse​(Reader reader)

      Specified by:
        `parse` in interface `JsonParser`

    - #### parse

          public Object parse​(InputStream input)

      Specified by:
        `parse` in interface `JsonParser`

    - #### parse

          public Object parse​(InputStream input,
                              String charset)

      Specified by:
        `parse` in interface `JsonParser`

    - #### parse

          public Object parse​(File file,
                              String charset)

      Specified by:
        `parse` in interface `JsonParser`

    - #### isDecimalChar

          protected static boolean isDecimalChar​(int currentChar)

    - #### isDelimiter

          protected static boolean isDelimiter​(int c)

    - #### isNumberDigit

          protected static final boolean isNumberDigit​(int c)

    - #### isDoubleQuote

          protected static final boolean isDoubleQuote​(int c)

    - #### isEscape

          protected static final boolean isEscape​(int c)

    - #### hasEscapeChar

          protected static boolean hasEscapeChar​(char[] array,
                                                 int index,
                                                 int[] indexHolder)

    - #### findEndQuote

          protected static int findEndQuote​(char[] array,
                                            int index)