Get json array keys in android

前端 未结 5 1174
渐次进展
渐次进展 2020-12-15 09:16
{
    \"204\": {
        \"host\": \"https:\\/\\/abc.com\\/production-source\\/ChangSha\\/2013\\/12\\/02\\/0\\/0\\/A\\/Content\\/\",
        \"timestamp\": 138590988         


        
5条回答
  •  醉酒成梦
    2020-12-15 09:19

    Here you are trying to get JSONArray but in json response it is JSONObject.

    Use following code.

    JSONObject issueObject = new JSONObject(jsonContent);
    String _pubKey = issueObject.getString(0);
    

提交回复
热议问题