我是Android开发方面的新手。在我的应用程序中,我有很多想要通过REST请求获取的文件.JSON。有没有用于Android的JSON本地服务器,我可以在那里保存这些文件并执行一些REST请求?
谢谢
发布于 2016-06-29 21:32:51
使用这个url :- https://github.com/typicode/json-server。
发布于 2017-09-05 16:36:51
我偶然发现并使用了SyncAdapter和json-server到firebase,我把android当作一个网络应用程序来对待。
我注意到该指南使用了uri和json解析,所以我将我的伪rest db.json导入到了firebase,并使用了https://console.firebase.google.com/project/new-firebase-app/database/data上的链接。
...
final String rest = "https://new-firebase-app.firebaseio.com/people.json";
// Parse the pretend json news feed
String jsonFeed = download(rest);
JSONArray jsonPeople = new JSONArray(jsonFeed);
...这可能会有帮助。
https://stackoverflow.com/questions/38101007
复制相似问题