public class JSONException extends Exception
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(String s) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public JSONException(String s)