JSONParserConfiguration (JSON in Java 20240205 API)

Package org.json

## Class JSONParserConfiguration

- java.lang.Object
- - org.json.ParserConfiguration
  - - org.json.JSONParserConfiguration

-     public class JSONParserConfiguration
      extends ParserConfiguration

  Configuration object for the JSON parser. The configuration is immutable.

- - ### Field Summary

    - ### Fields inherited from class org.json.ParserConfiguration

      `DEFAULT_MAXIMUM_NESTING_DEPTH, keepStrings, maxNestingDepth, UNDEFINED_MAXIMUM_NESTING_DEPTH`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `JSONParserConfiguration()` | Configuration with the default values.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected JSONParserConfiguration` | `clone()` | Provides a new instance of the same configuration.
    `JSONParserConfiguration` | `withMaxNestingDepth​(int maxNestingDepth)` | Defines the maximum nesting depth that the parser will descend before throwing an exception when parsing the XML into JSONML.

    - ### Methods inherited from class org.json.ParserConfiguration

      `getMaxNestingDepth, isKeepStrings, withKeepStrings`

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

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

- - ### Constructor Detail

    - #### JSONParserConfiguration

          public JSONParserConfiguration()

      Configuration with the default values.

  - ### Method Detail

    - #### clone

          protected JSONParserConfiguration clone()

      Description copied from class: `ParserConfiguration`
      Provides a new instance of the same configuration.
      Overrides:
        `clone` in class `ParserConfiguration`

    - #### withMaxNestingDepth

          public JSONParserConfiguration withMaxNestingDepth​(int maxNestingDepth)

      Description copied from class: `ParserConfiguration`
      Defines the maximum nesting depth that the parser will descend before throwing an exception when parsing the XML into JSONML. The default max nesting depth is 512, which means the parser will throw a JsonException if the maximum depth is reached. Using any negative value as a parameter is equivalent to setting no limit to the nesting depth, which means the parses will go as deep as the maximum call stack size allows.
      Overrides:
        `withMaxNestingDepth` in class `ParserConfiguration`
      Parameters:
        `maxNestingDepth` - the maximum nesting depth allowed to the XML parser
      Returns:
        The existing configuration will not be modified. A new configuration is returned.