Class BaseJsonParser

All Implemented Interfaces:
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 Summary

    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 java.lang.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 java.util.concurrent.ConcurrentHashMap<java.lang.String,​java.lang.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

    Constructor Description
  • Method Summary

    Modifier and Type Method Description
    protected java.lang.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)  
    java.lang.Object parse​(byte[] bytes)  
    java.lang.Object parse​(byte[] bytes, java.lang.String charset)  
    java.lang.Object parse​( file, java.lang.String charset)  
    java.lang.Object parse​( input)  
    java.lang.Object parse​( input, java.lang.String charset)  
    java.lang.Object parse​( reader)  
    java.lang.Object parse​(java.lang.CharSequence charSequence)  
    java.lang.Object parse​(java.lang.String jsonString)  
    void setCharset​(java.lang.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

  • Field Details

  • Constructor Details

    • BaseJsonParser

      public BaseJsonParser()
  • Method Details

    • charDescription

      protected java.lang.String charDescription​(int c)
    • setCharset

      public void setCharset​(java.lang.String charset)
    • parse

      public java.lang.Object parse​(java.lang.String jsonString)
      Specified by:
      parse in interface JsonParser
    • parse

      public java.lang.Object parse​(byte[] bytes)
      Specified by:
      parse in interface JsonParser
    • parse

      public java.lang.Object parse​(byte[] bytes, java.lang.String charset)
      Specified by:
      parse in interface JsonParser
    • parse

      public java.lang.Object parse​(java.lang.CharSequence charSequence)
      Specified by:
      parse in interface JsonParser
    • parse

      public java.lang.Object parse​( reader)
      Specified by:
      parse in interface JsonParser
    • parse

      public java.lang.Object parse​( input)
      Specified by:
      parse in interface JsonParser
    • parse

      public java.lang.Object parse​( input, java.lang.String charset)
      Specified by:
      parse in interface JsonParser
    • parse

      public java.lang.Object parse​( file, java.lang.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)