Package: org.apache.groovy.json.internal

## [Java] Class JsonFastParser

- org.apache.groovy.json.internal.JsonFastParser

-     public class JsonFastParser
      extends JsonParserCharArray

  This works in index overlay mode or chop mode. Chop mode reduces possibility of memory leak but causes a few more buffer copies as it chops up the buffer.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class JsonParserCharArray` | `FALSE, NULL, TRUE, __currentChar, __index, charArray`
    `class BaseJsonParser` | `ALPHA_0, ALPHA_1, ALPHA_2, ALPHA_3, ALPHA_4, ALPHA_5, ALPHA_6, ALPHA_7, ALPHA_8, ALPHA_9, CLOSED_BRACKET, CLOSED_CURLY, COLON, COMMA, DECIMAL_POINT, DEFAULT_MAX_NESTING_DEPTH, DOUBLE_QUOTE, ESCAPE, LETTER_BIG_E, LETTER_E, MINUS, PLUS, bufSize, charset, internKeys, internedKeysCache, maxNestingDepth`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `JsonFastParser()` Creates a parser with eager value containers and lazy chopping.
    `JsonFastParser(boolean useValues)` Creates a parser with the supplied value-container mode.
    `JsonFastParser(boolean useValues, boolean chop)` Creates a parser with explicit chopping behavior.
    `JsonFastParser(boolean useValues, boolean chop, boolean lazyChop)` Creates a parser with explicit lazy chopping behavior.
    `JsonFastParser(boolean useValues, boolean chop, boolean lazyChop, boolean checkDates)` Creates a parser with full overlay configuration.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected final Object` | `decodeFromChars(char[] cs)` Parses a character buffer and unwraps top-level container values.
    `` | `protected final Value` | `decodeJsonObjectLazyFinalParse()` Decodes an object using overlay values and deferred materialization.
    `` | `protected Value` | `decodeValue()` Decodes the next JSON value as an overlay Value.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class JsonParserCharArray` | `complain, currentChar, decodeFalse, decodeFromChars, decodeJsonArray, decodeJsonObject, decodeNull, decodeTrue, decodeValue, exceptionDetails, hasCurrent, hasMore, nextChar, parse, skipWhiteSpace`
    `class BaseJsonParser` | `charDescription, enterNesting, exitNesting, findEndQuote, getMaxNestingDepth, hasEscapeChar, isDecimalChar, isDelimiter, isDoubleQuote, isEscape, isNumberDigit, parse, parse, parse, parse, parse, parse, parse, parse, resetNesting, setCharset, setMaxNestingDepth`

- - ### Constructor Detail

    - #### public JsonFastParser()

      Creates a parser with eager value containers and lazy chopping.

    - #### public JsonFastParser(boolean useValues)

      Creates a parser with the supplied value-container mode.

      Parameters:
        `useValues` - whether to use eager Value containers

    - #### public JsonFastParser(boolean useValues, boolean chop)

      Creates a parser with explicit chopping behavior.

      Parameters:
        `useValues` - whether to use eager Value containers
        `chop` - whether to eagerly copy overlay slices

    - #### public JsonFastParser(boolean useValues, boolean chop, boolean lazyChop)

      Creates a parser with explicit lazy chopping behavior.

      Parameters:
        `useValues` - whether to use eager Value containers
        `chop` - whether to eagerly copy overlay slices
        `lazyChop` - whether to defer chopping until values are accessed

    - #### public JsonFastParser(boolean useValues, boolean chop, boolean lazyChop, boolean checkDates)

      Creates a parser with full overlay configuration.

      Parameters:
        `useValues` - whether to use eager Value containers
        `chop` - whether to eagerly copy overlay slices
        `lazyChop` - whether to defer chopping until values are accessed
        `checkDates` - whether strings should be tested for supported date formats

  - ### Method Detail

    - #### protected final Object decodeFromChars(char[] cs)

      Parses a character buffer and unwraps top-level container values.

      Parameters:
        `cs` - JSON content to parse
      Returns:
        parsed Groovy JSON value

    - #### protected final Value decodeJsonObjectLazyFinalParse()

      Decodes an object using overlay values and deferred materialization.

      Returns:
        parsed object value container

    - #### protected Value decodeValue()

      Decodes the next JSON value as an overlay Value.

      Returns:
        parsed overlay value