当前位置: 代码迷 >> Android >> android json数据传递
  详细解决方案

android json数据传递

热度:31   发布时间:2016-05-01 17:57:00.0
android json数据传送
怎样用json把数据从web上传到android客户端上

------解决方案--------------------
首先你的web app要定义要json的格式.然后,在android段,通过urlconnection去读取webapp上的json数据,得到的应该是一个json字符串。如果是一个jsonarray,就通过JSONArray arr = new JSONArray (string)。如果是你jsonobject,就new JSONObject(string);