我想使用Jquery获取存储在手机内存中的json数据。我是这样开发的。
(文档)$。就绪(函数(){
$.getJSON('file:///data/data/com.bst.catalogue/files/myfile.json',
function(data) {
$.each(data.catalogue, function(entryIndex, entry) {
});
});
});
但这不起作用。如何从内部存储器访问json文件?我的Json数据是这样的:
{
"catalogue": [
[
{
"catalogue_id": "59",
"catalogue_name": "IT Catalog",
"catalogue_cover": "http://192.168.0.22:90/Ecatalogue/catalogue/covers/511b21f398969.jpeg",
"category": {
"id": "60",
"name": "Computer Accessory",
"cover": "http://192.168.0.22:90/Ecatalogue/category/covers/511b2e11e8b26.jpg",
"item": {
"id": "61",
"name": "CD",
"cover": "http://192.168.0.22:90/Ecatalogue/item/covers/511b2e1da3063.jpg",
"description": "",
"price": "0.00"
}
}
}
]
]
}