使用HTTP POST方法为Android应用程序发送JSON对象 [英] send json object using http post method for android application
问题描述
我试图发送JSON对象到我的PHP Web服务。
i am trying to send JSON object to my php webservice.
我已经提到这个网址: - 的http://www.josecgomez.com/2010/04/30/android-accessing-restfull-web-services-using-json/
I have referred this url :- http://www.josecgomez.com/2010/04/30/android-accessing-restfull-web-services-using-json/
在我的web服务,我要过的用户名和密码,但我不知道,
In my web service, I have to pass username and password but i don't know,
什么是GSON。你可以告诉这个原因GSON使用。????
what is the GSON. can you tell why GSON use in this.????
我是新的JSON。如果你知道JSON请指导我解决这个问题。
I am new in json. if you know about json please guide me to solve this problem.
推荐答案
GSON 是一个Java库,Java对象转换成JSON,反之亦然。你不需要它,除非你有一些复杂的JSON结构。对于简单的对象,你可以轻松地构建自己的JSON字符串。
GSON is a Java library to convert java objects to JSON and vice-versa. You don't need it unless you have some complex JSON structure. For simple objects you can easily construct the JSON string yourself.
这篇关于使用HTTP POST方法为Android应用程序发送JSON对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!