开发者

How to make a request for sending a list of rows in a rest client -Android

I am working on a REST client in android.My web service开发者_如何学Go is based on Rails.My scenario is that I have an class named user which has attributes like age,name,gender etc.I want to send a list of user objects to the server so that i can insert it into the database.Can someone let me know how i can do this using json?


Have your user class be a JSONObject and then post the objects to your server as JSON strings using JSONObject.quote() and turn those strings back into arrays/objects at the server end.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜