How to make a nested Json object in Java?

后端 未结 4 1971
伪装坚强ぢ
伪装坚强ぢ 2020-12-25 13:42

I want to program a nested JSON Object for my Android device, but how? I have only basic experience with Json, so I would appreciate if someone could help me with the follow

4条回答
  •  误落风尘
    2020-12-25 14:01

    You need to create a JSON, and add that JSON as a parameter in your POST. To do that you should probably :

    post.add(new BasicNameValuePair("data",json.toString());
    

    You could use org.json.JSONObject, it is included in the Android SDK.

提交回复
热议问题