【发布时间】:2013-10-20 18:30:25
【问题描述】:
我是 Android 程序员的新手,我想通过 JSON 以以下格式将数据发送到服务器,并以这种格式实现 Json..并且还想从服务器获取数据..
- 网址:http://fort.example.com
- 注册
{
"signup": [
{
"username": "test1264",
"password": "1234",
"email": "example@gmail.com",
"phoneno": "223344556",
"altphoneno": "12345678",
"firstname": "abc",
"lastname": "xyz"
} ]
}
回复:
成功时:
{"status":1}
失败时:{"status":0}
- 用于用户登录的 JSON:
{"login":[
{"username":"test1234",
"password":"1234"}
]}
Response:
on success: {
"user": [
{
"firstname": "abc",
"lastname": "xyz",
"email": "example@gmail.com",
"phone": "99887766",
"username": "test1234"
}
]
}
失败时:{"error":["Auth error"]}
【问题讨论】: