我得到了儿童文件mongodb
android重新搜索数据并读取它们
+的NodeJS MongoDB的
[ { pinNumber: '4',
nameDevice: 'den ngu',
pintype: 0,
deleted: '0',
status: '0',
laston: '31 thg 5, 2017 10:53:02' },
{ pinNumber: '9',
nameDevice: 'quat ngu',
pintype: 0,
deleted: '0',
status: '0',
laston: '31 thg 5, 2017 10:54:14' },
{ pinNumber: '4',
nameDevice: 'den',
pintype: 0,
deleted: '0',
status: '0',
space_id: '592cf576a53411474242b5fa',
laston: '31 thg 5, 2017 11:45:31' } ] }
我无法解析他们,帮助我!
答案 0 :(得分:0)
假设你想在java中解析这个json,你可以看一下: How to parse JSON in Java
import org.json。*;
JSONObject data = new JSONObject(" you json here");
for(int i = 0; i< data.length(); i ++){
String pinNumber = data.getJSONObject(i).getString(" pinNumber");
}
可下载jar:http://mvnrepository.com/artifact/org.json/json
你似乎有额外的'}'最后在你的json。