如何通过Json
发送和获取请求?我试图把值放在Json
对象中。
我想完整教程Json
。
我不是通过Json
发送请求到服务器。完整的Json功能在Android中
我想补充key/value
对:如果您使用Apache HTTP客户端
jsonObjSend.put("username", "[email protected]");
jsonObjSend.put("password", "abcxyz");
// Add a nested JSONObject (e.g. for header information)
JSONObject header = new JSONObject();
header.put("deviceType","Android"); // Device type
header.put("deviceVersion","2.0"); // Device OS version
header.put("language", "es-es"); // Language of the Android client
jsonObjSend.put("header", header);
感谢您的帮助 – 2015-01-21 05:36:42
不要忘了接受的答案,如果它的作品! – 2015-01-21 05:39:14