public class JSONException
extends java.lang.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);
}
}| 构造器和说明 |
|---|
JSONException(java.lang.String s) |