Uses of Class org.json.JSONException (JSON in Java 20240205 API)

## Uses of Class
org.json.JSONException

- - ### Uses of JSONException in org.json

    Subclasses of JSONException in org.json
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `JSONPointerException` | The JSONPointerException is thrown by `JSONPointer` if an error occurs during evaluating a pointer.

    Methods in org.json that return JSONException
    Modifier and Type | Method | Description
    --- | --- | ---
    `JSONException` | JSONTokener.`syntaxError​(String message)` | Make a JSONException to signal a syntax error.
    `JSONException` | JSONTokener.`syntaxError​(String message, Throwable causedBy)` | Make a JSONException to signal a syntax error.

    Methods in org.json that throw JSONException
    Modifier and Type | Method | Description
    --- | --- | ---
    `JSONObject` | JSONObject.`accumulate​(String key, Object value)` | Accumulate values under a key.
    `JSONObject` | JSONObject.`append​(String key, Object value)` | Append values to the array under a key.
    `JSONWriter` | JSONWriter.`array()` | Begin appending a new array.
    `void` | JSONTokener.`back()` | Back up one character.
    `JSONWriter` | JSONWriter.`endArray()` | End an array.
    `JSONWriter` | JSONWriter.`endObject()` | End an object.
    `Object` | JSONArray.`get​(int index)` | Get the object value associated with an index.
    `Object` | JSONObject.`get​(String key)` | Get the value object associated with a key.
    `BigDecimal` | JSONArray.`getBigDecimal​(int index)` | Get the BigDecimal value associated with an index.
    `BigDecimal` | JSONObject.`getBigDecimal​(String key)` | Get the BigDecimal value associated with a key.
    `BigInteger` | JSONArray.`getBigInteger​(int index)` | Get the BigInteger value associated with an index.
    `BigInteger` | JSONObject.`getBigInteger​(String key)` | Get the BigInteger value associated with a key.
    `boolean` | JSONArray.`getBoolean​(int index)` | Get the boolean value associated with an index.
    `boolean` | JSONObject.`getBoolean​(String key)` | Get the boolean value associated with a key.
    `double` | JSONArray.`getDouble​(int index)` | Get the double value associated with an index.
    `double` | JSONObject.`getDouble​(String key)` | Get the double value associated with a key.
    `<E extends Enum<E>> E` | JSONArray.`getEnum​(Class<E> clazz, int index)` | Get the enum value associated with an index.
    `<E extends Enum<E>> E` | JSONObject.`getEnum​(Class<E> clazz, String key)` | Get the enum value associated with a key.
    `float` | JSONArray.`getFloat​(int index)` | Get the float value associated with a key.
    `float` | JSONObject.`getFloat​(String key)` | Get the float value associated with a key.
    `int` | JSONArray.`getInt​(int index)` | Get the int value associated with an index.
    `int` | JSONObject.`getInt​(String key)` | Get the int value associated with a key.
    `JSONArray` | JSONArray.`getJSONArray​(int index)` | Get the JSONArray associated with an index.
    `JSONArray` | JSONObject.`getJSONArray​(String key)` | Get the JSONArray value associated with a key.
    `JSONObject` | JSONArray.`getJSONObject​(int index)` | Get the JSONObject associated with an index.
    `JSONObject` | JSONObject.`getJSONObject​(String key)` | Get the JSONObject value associated with a key.
    `long` | JSONArray.`getLong​(int index)` | Get the long value associated with an index.
    `long` | JSONObject.`getLong​(String key)` | Get the long value associated with a key.
    `Number` | JSONArray.`getNumber​(int index)` | Get the Number value associated with a key.
    `Number` | JSONObject.`getNumber​(String key)` | Get the Number value associated with a key.
    `String` | JSONArray.`getString​(int index)` | Get the string associated with an index.
    `String` | JSONObject.`getString​(String key)` | Get the string associated with a key.
    `JSONObject` | JSONObject.`increment​(String key)` | Increment a property of a JSONObject.
    `String` | JSONArray.`join​(String separator)` | Make a string from the contents of this JSONArray.
    `JSONWriter` | JSONWriter.`key​(String string)` | Append a key.
    `boolean` | JSONTokener.`more()` | Determine if the source string still contains characters that next() can consume.
    `char` | JSONTokener.`next()` | Get the next character in the source string.
    `char` | JSONTokener.`next​(char c)` | Consume the next character, and check that it matches a specified character.
    `String` | JSONTokener.`next​(int n)` | Get the next n characters.
    `String` | XMLTokener.`nextCDATA()` | Get the text in the CDATA block.
    `char` | JSONTokener.`nextClean()` | Get the next char in the string, skipping whitespace.
    `Object` | XMLTokener.`nextContent()` | Get the next XML outer token, trimming whitespace.
    `Object` | XMLTokener.`nextEntity​(char ampersand)` | `Return the next entity. These entities are translated to Characters: &amp; &apos; &gt; &lt; &quot;.`
    `Object` | XMLTokener.`nextMeta()` | `Returns the next XML meta token. This is used for skipping over <!...> and <?...?> structures.`
    `String` | JSONTokener.`nextString​(char quote)` | Return the characters up to the next close quote character.
    `String` | JSONTokener.`nextTo​(char delimiter)` | Get the text up but not including the specified character or the end of line, whichever comes first.
    `String` | JSONTokener.`nextTo​(String delimiters)` | Get the text up but not including one of the specified delimiter characters or the end of line, whichever comes first.
    `String` | HTTPTokener.`nextToken()` | Get the next token or string.
    `Object` | XMLTokener.`nextToken()` | `Get the next XML Token. These tokens are found inside of angle brackets. It may be one of these characters: / > = ! ? or it may be a string wrapped in single quotes or double quotes, or it may be a name.`
    `Object` | JSONTokener.`nextValue()` | Get the next value.
    `static void` | XML.`noSpace​(String string)` | Throw an exception if the string contains whitespace.
    `static String` | JSONObject.`numberToString​(Number number)` | Produce a string from a Number.
    `JSONWriter` | JSONWriter.`object()` | Begin appending a new object.
    `JSONArray` | JSONArray.`put​(double value)` | Append a double value.
    `JSONArray` | JSONArray.`put​(float value)` | Append a float value.
    `JSONArray` | JSONArray.`put​(int index, boolean value)` | Put or replace a boolean value in the JSONArray.
    `JSONArray` | JSONArray.`put​(int index, double value)` | Put or replace a double value.
    `JSONArray` | JSONArray.`put​(int index, float value)` | Put or replace a float value.
    `JSONArray` | JSONArray.`put​(int index, int value)` | Put or replace an int value.
    `JSONArray` | JSONArray.`put​(int index, long value)` | Put or replace a long value.
    `JSONArray` | JSONArray.`put​(int index, Object value)` | Put or replace an object value in the JSONArray.
    `JSONArray` | JSONArray.`put​(int index, Collection<?> value)` | Put a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection.
    `JSONArray` | JSONArray.`put​(int index, Map<?,​?> value)` | Put a value in the JSONArray, where the value will be a JSONObject that is produced from a Map.
    `JSONArray` | JSONArray.`put​(int index, Map<?,​?> value, JSONParserConfiguration jsonParserConfiguration)` | Put a value in the JSONArray, where the value will be a JSONObject that is produced from a Map.
    `JSONObject` | JSONObject.`put​(String key, boolean value)` | Put a key/boolean pair in the JSONObject.
    `JSONObject` | JSONObject.`put​(String key, double value)` | Put a key/double pair in the JSONObject.
    `JSONObject` | JSONObject.`put​(String key, float value)` | Put a key/float pair in the JSONObject.
    `JSONObject` | JSONObject.`put​(String key, int value)` | Put a key/int pair in the JSONObject.
    `JSONObject` | JSONObject.`put​(String key, long value)` | Put a key/long pair in the JSONObject.
    `JSONObject` | JSONObject.`put​(String key, Object value)` | Put a key/value pair in the JSONObject.
    `JSONObject` | JSONObject.`put​(String key, Collection<?> value)` | Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection.
    `JSONObject` | JSONObject.`put​(String key, Map<?,​?> value)` | Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map.
    `JSONArray` | JSONArray.`putAll​(Object array)` | Put an array's elements in to the JSONArray.
    `JSONObject` | JSONObject.`putOnce​(String key, Object value)` | Put a key/value pair in the JSONObject, but only if the key and the value are both non-null, and only if there is not already a member with that name.
    `JSONObject` | JSONObject.`putOpt​(String key, Object value)` | Put a key/value pair in the JSONObject, but only if the key and the value are both non-null.
    `static JSONArray` | CDL.`rowToJSONArray​(JSONTokener x)` | Produce a JSONArray of strings from a row of comma delimited values.
    `static JSONObject` | CDL.`rowToJSONObject​(JSONArray names, JSONTokener x)` | Produce a JSONObject from a row of comma delimited text, using a parallel JSONArray of strings to provides the names of the elements.
    `char` | JSONTokener.`skipTo​(char to)` | Skip characters until the next character is the requested character.
    `static void` | JSONObject.`testValidity​(Object o)` | Throw an exception if the object is a NaN or infinite number.
    `static JSONArray` | CDL.`toJSONArray​(String string)` | Produce a JSONArray of JSONObjects from a comma delimited text string, using the first row as a source of names.
    `static JSONArray` | CDL.`toJSONArray​(JSONArray names, String string)` | Produce a JSONArray of JSONObjects from a comma delimited text string using a supplied JSONArray as the source of element names.
    `static JSONArray` | CDL.`toJSONArray​(JSONArray names, JSONTokener x)` | Produce a JSONArray of JSONObjects from a comma delimited text string using a supplied JSONArray as the source of element names.
    `static JSONArray` | CDL.`toJSONArray​(JSONTokener x)` | Produce a JSONArray of JSONObjects from a comma delimited text string, using the first row as a source of names.
    `static JSONArray` | JSONML.`toJSONArray​(String string)` | Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform.
    `static JSONArray` | JSONML.`toJSONArray​(String string, boolean keepStrings)` | Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform.
    `static JSONArray` | JSONML.`toJSONArray​(String string, JSONMLParserConfiguration config)` | Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform.
    `static JSONArray` | JSONML.`toJSONArray​(XMLTokener x)` | Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform.
    `static JSONArray` | JSONML.`toJSONArray​(XMLTokener x, boolean keepStrings)` | Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform.
    `static JSONArray` | JSONML.`toJSONArray​(XMLTokener x, JSONMLParserConfiguration config)` | Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform.
    `JSONArray` | JSONObject.`toJSONArray​(JSONArray names)` | Produce a JSONArray containing the values of the members of this JSONObject.
    `static JSONObject` | CookieList.`toJSONObject​(String string)` | Convert a cookie list into a JSONObject.
    `static JSONObject` | HTTP.`toJSONObject​(String string)` | Convert an HTTP header string into a JSONObject.
    `JSONObject` | JSONArray.`toJSONObject​(JSONArray names)` | Produce a JSONObject by combining a JSONArray of names with the values of this JSONArray.
    `static JSONObject` | JSONML.`toJSONObject​(String string)` | Convert a well-formed (but not necessarily valid) XML string into a JSONObject using the JsonML transform.
    `static JSONObject` | JSONML.`toJSONObject​(String string, boolean keepStrings)` | Convert a well-formed (but not necessarily valid) XML string into a JSONObject using the JsonML transform.
    `static JSONObject` | JSONML.`toJSONObject​(String string, JSONMLParserConfiguration config)` | Convert a well-formed (but not necessarily valid) XML string into a JSONObject using the JsonML transform.
    `static JSONObject` | JSONML.`toJSONObject​(XMLTokener x)` | Convert a well-formed (but not necessarily valid) XML string into a JSONObject using the JsonML transform.
    `static JSONObject` | JSONML.`toJSONObject​(XMLTokener x, boolean keepStrings)` | Convert a well-formed (but not necessarily valid) XML string into a JSONObject using the JsonML transform.
    `static JSONObject` | JSONML.`toJSONObject​(XMLTokener x, JSONMLParserConfiguration config)` | Convert a well-formed (but not necessarily valid) XML string into a JSONObject using the JsonML transform.
    `static JSONObject` | Property.`toJSONObject​(Properties properties)` | Converts a property file object into a JSONObject.
    `static JSONObject` | XML.`toJSONObject​(Reader reader)` | Convert a well-formed (but not necessarily valid) XML into a JSONObject.
    `static JSONObject` | XML.`toJSONObject​(Reader reader, boolean keepStrings)` | Convert a well-formed (but not necessarily valid) XML into a JSONObject.
    `static JSONObject` | XML.`toJSONObject​(Reader reader, XMLParserConfiguration config)` | Convert a well-formed (but not necessarily valid) XML into a JSONObject.
    `static JSONObject` | XML.`toJSONObject​(String string)` | Convert a well-formed (but not necessarily valid) XML string into a JSONObject.
    `static JSONObject` | XML.`toJSONObject​(String string, boolean keepStrings)` | Convert a well-formed (but not necessarily valid) XML string into a JSONObject.
    `static JSONObject` | XML.`toJSONObject​(String string, XMLParserConfiguration config)` | Convert a well-formed (but not necessarily valid) XML string into a JSONObject.
    `static Properties` | Property.`toProperties​(JSONObject jo)` | Converts the JSONObject into a property file object.
    `static String` | CDL.`toString​(JSONArray ja)` | Produce a comma delimited text from a JSONArray of JSONObjects.
    `static String` | CDL.`toString​(JSONArray names, JSONArray ja)` | Produce a comma delimited text from a JSONArray of JSONObjects using a provided list of names.
    `static String` | Cookie.`toString​(JSONObject jo)` | Convert a JSONObject into a cookie specification string.
    `static String` | CookieList.`toString​(JSONObject jo)` | Convert a JSONObject into a cookie list.
    `static String` | HTTP.`toString​(JSONObject jo)` | Convert a JSONObject into an HTTP header.
    `String` | JSONArray.`toString​(int indentFactor)` | Make a pretty-printed JSON text of this JSONArray.
    `static String` | JSONML.`toString​(JSONArray ja)` | Reverse the JSONML transformation, making an XML text from a JSONArray.
    `static String` | JSONML.`toString​(JSONObject jo)` | Reverse the JSONML transformation, making an XML text from a JSONObject.
    `String` | JSONObject.`toString​(int indentFactor)` | Make a pretty-printed JSON text of this JSONObject.
    `static String` | XML.`toString​(Object object)` | Convert a JSONObject into a well-formed, element-normal XML string.
    `static String` | XML.`toString​(Object object, String tagName, XMLParserConfiguration config)` | Convert a JSONObject into a well-formed, element-normal XML string.
    `static String` | XML.`toString​(Object object, String tagName, XMLParserConfiguration config, int indentFactor)` | Convert a JSONObject into a well-formed, pretty printed element-normal XML string.
    `JSONWriter` | JSONWriter.`value​(boolean b)` | Append either the value `true` or the value `false`.
    `JSONWriter` | JSONWriter.`value​(double d)` | Append a double value.
    `JSONWriter` | JSONWriter.`value​(long l)` | Append a long value.
    `JSONWriter` | JSONWriter.`value​(Object object)` | Append an object value.
    `static String` | JSONObject.`valueToString​(Object value)` | Make a JSON text of an Object value.
    `static String` | JSONWriter.`valueToString​(Object value)` | Make a JSON text of an Object value.
    `Writer` | JSONArray.`write​(Writer writer)` | Write the contents of the JSONArray as JSON text to a writer.
    `Writer` | JSONArray.`write​(Writer writer, int indentFactor, int indent)` | Write the contents of the JSONArray as JSON text to a writer.
    `Writer` | JSONObject.`write​(Writer writer)` | Write the contents of the JSONObject as JSON text to a writer.
    `Writer` | JSONObject.`write​(Writer writer, int indentFactor, int indent)` | Write the contents of the JSONObject as JSON text to a writer.

    Constructors in org.json that throw JSONException
    Constructor | Description
    --- | ---
    `JSONArray​(int initialCapacity)` | Construct a JSONArray with the specified initial capacity.
    `JSONArray​(Object array)` | Construct a JSONArray from an array.
    `JSONArray​(String source)` | Construct a JSONArray from a source JSON text.
    `JSONArray​(JSONTokener x)` | Construct a JSONArray from a JSONTokener.
    `JSONObject​(String source)` | Construct a JSONObject from a source JSON text string.
    `JSONObject​(String baseName, Locale locale)` | Construct a JSONObject from a ResourceBundle.
    `JSONObject​(JSONTokener x)` | Construct a JSONObject from a JSONTokener.