org.apache.struts2.json

## Class JSONReader

- java.lang.Object
- - org.apache.struts2.json.JSONReader

-     public class JSONReader
      extends Object

  Deserializes and object from a JSON string

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JSONReader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `add()`
    `protected void` | `add(char cc)`
    `protected void` | `addDigits()`
    `protected List` | `array()`
    `protected JSONException` | `buildInvalidInputException()`
    `protected char` | `next()`
    `protected Object` | `number()`
    `protected Map` | `object()`
    `protected Object` | `read()`
    `Object` | `read(String string)`
    `void` | `setMaxDepth(int maxDepth)`
    `void` | `setMaxElements(int maxElements)`
    `void` | `setMaxKeyLength(int maxKeyLength)`
    `void` | `setMaxStringLength(int maxStringLength)`
    `protected void` | `skipWhiteSpace()`
    `protected Object` | `string(char quote)`
    `protected char` | `unicode()`

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

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

- - ### Constructor Detail

    - #### JSONReader

          public JSONReader()

  - ### Method Detail

    - #### setMaxElements

          public void setMaxElements(int maxElements)

    - #### setMaxDepth

          public void setMaxDepth(int maxDepth)

    - #### setMaxStringLength

          public void setMaxStringLength(int maxStringLength)

    - #### setMaxKeyLength

          public void setMaxKeyLength(int maxKeyLength)

    - #### next

          protected char next()

    - #### skipWhiteSpace

          protected void skipWhiteSpace()

    - #### read

          public Object read(String string)
                      throws JSONException

      Throws:
        `JSONException`

    - #### read

          protected Object read()
                         throws JSONException

      Throws:
        `JSONException`

    - #### object

          protected Map object()
                        throws JSONException

      Throws:
        `JSONException`

    - #### buildInvalidInputException

          protected JSONException buildInvalidInputException()

    - #### array

          protected List array()
                        throws JSONException

      Throws:
        `JSONException`

    - #### number

          protected Object number()
                           throws JSONException

      Throws:
        `JSONException`

    - #### string

          protected Object string(char quote)
                           throws JSONException

      Throws:
        `JSONException`

    - #### add

          protected void add(char cc)

    - #### add

          protected void add()

    - #### addDigits

          protected void addDigits()

    - #### unicode

          protected char unicode()

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.