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);
}
}| 构造器和说明 |
|---|
JSONException(String s) |
public JSONException(String s)
Copyright © 2020. All rights reserved.