public class JsonParserLax
extends JsonParserCharArray
JSON parser variant that also accepts comments, single quotes, and unquoted strings.
| 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, DOUBLE_QUOTE, ESCAPE, LETTER_BIG_E, LETTER_E, MINUS, PLUS, bufSize, charset, internKeys, internedKeysCache |
| Constructor and description |
|---|
JsonParserLax()Creates a lax parser with eager value containers and lazy chopping. |
JsonParserLax(boolean useValues)Creates a lax parser with the supplied value-container mode. |
JsonParserLax(boolean useValues, boolean chop)Creates a lax parser with explicit chopping behavior. |
JsonParserLax(boolean useValues, boolean chop, boolean lazyChop)Creates a lax parser with explicit lazy chopping behavior. |
JsonParserLax(boolean useValues, boolean chop, boolean lazyChop, boolean defaultCheckDates)Creates a lax parser with full overlay configuration. |
| 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 |
decodeNumberLax(boolean minus)Decodes a number from a JSON value. |
|
protected final Object |
decodeValue()Decodes the next value using the parser's lax JSON rules. |
| 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, findEndQuote, hasEscapeChar, isDecimalChar, isDelimiter, isDoubleQuote, isEscape, isNumberDigit, parse, parse, parse, parse, parse, parse, parse, parse, setCharset |
Creates a lax parser with eager value containers and lazy chopping.
Creates a lax parser with the supplied value-container mode.
useValues - whether to use eager Value containersCreates a lax parser with explicit chopping behavior.
useValues - whether to use eager Value containerschop - whether to eagerly copy overlay slicesCreates a lax parser with explicit lazy chopping behavior.
useValues - whether to use eager Value containerschop - whether to eagerly copy overlay sliceslazyChop - whether to defer chopping until values are accessedCreates a lax parser with full overlay configuration.
useValues - whether to use eager Value containerschop - whether to eagerly copy overlay sliceslazyChop - whether to defer chopping until values are accesseddefaultCheckDates - whether strings should be tested for supported date formatsParses a character buffer and unwraps top-level container values.
cs - JSON content to parse Decodes a number from a JSON value. If at any point it is determined that
the value is not a valid number the value is treated as a String.
minus - indicate whether the number is negativeString if not a valid numberDecodes the next value using the parser's lax JSON rules.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.