public static JSONObject getJSONObject(String str) {
if (str == null || str.trim().length() == 0) {
return null;
}
JSONObject jsonObject = null;
try {
jsonObject = new JSONObject(str);
} catch (JSONException e) {
e.printStackTrace(System.err);
}
return jsonObject;
}
字符串转换成JSONObject
最新推荐文章于 2025-06-26 00:15:07 发布