0
我的代码 - 我试图从JSON返回数据。如何从Amazon API Gateway的API中将此Dynamo DB数据解析为Android?
JSONObject count = new JSONObject(finalJson);
JSONArray itemsArray = count.getJSONArray("Items");
JSONObject finalObject = itemsArray.getJSONObject(0);
String record = finalObject.getString("myid");
String vocabulary = finalObject.getString("vocab");
String method = finalObject.getString("method");
return record + vocabulary + method;
JSON我想parse-计数对象,项目阵列等..
{
"Count":1,
"Items":[
{
"myid":{
"S":"1"
},
"vocab":{
"S":"print a line"
},
"method":{
"S":"system.out.println"
}
}
],
"ScannedCount":1
你想回到什么? –
我想返回1的ID记录,打印一行和system.out.println。谢谢你的帮助! –
无法正确理解,请粘贴您的例外输出以及您正在获取的输出内容。 –