public class JSONException
extends java.lang.RuntimeException
NaNs or
infinities.
Although this is a checked exception, it is rarely recoverable. Most callers should simply wrap this exception in an unchecked exception and rethrow:
public JSONArray toJSONObject() {
try {
JSONObject result = new JSONObject();
...
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
| Constructor and Description |
|---|
JSONException(java.lang.String s) |
JSONException(java.lang.String message,
java.lang.Throwable cause) |
JSONException(java.lang.Throwable cause) |