org.json.JSONException: End of input at character 0 of

来源:互联网 发布:数据库系统基础初级篇 编辑:程序博客网 时间:2024/06/08 02:25


解析json字符串时出现org.json.JSONException: End of input at character 0 of 异常

  JSONObject jsonObject = new JSONObject(jsonString)

  jsonObject.getString("key");

原因:jsonStrign为""空的字符串,或者为"    "n个空格(此时异常信息为End of input at character  n  of)


0 0
原创粉丝点击