我正在制作应用程序并因为json而卡住整个json上的“逗号”因此我的请求失败所以检查代码并帮助我 感谢。
new android.os.Handler().postDelayed(
new Runnable() {
public void run() {
JSONObject jsobj=new JSONObject();
JSONObject jsobj1=new JSONObject();
try {
jsobj1.put("mobile",_mobileText.getText().toString());
jsobj1.put("s","payment");
jsobj1.put("cl","sample_client");
jsobj.put("pa",jsobj);
} catch (JSONException e) {
e.printStackTrace();
}
Ion.with(SignupActivity.this)
.load("POST", UrlConfigFile.BASE_URL)
.addHeader("Content-Type","application/json")
.addHeader("clientKey","sample_client")
.asJsonObject()
.setCallback(new FutureCallback<JsonObject>() {
@Override
public void onCompleted(Exception e, JsonObject result) {
if(e!=null)
{
Toast.makeText(SignupActivity.this, "Failed", Toast.LENGTH_SHORT).show();
}else
{
Toast.makeText(SignupActivity.this, "working "+result.toString(), Toast.LENGTH_SHORT).show();
onSignupSuccess();
}
}
});
// onSignupFailed();
progressDialog.dismiss();
}
}, 3000);
杰森就是这样的
{
“宾语”:{
“核心价值”,
“核心价值”
},
“核心价值”
}