【问题标题】:How to get value without json array from WCF service using android如何使用android从WCF服务中获取没有json数组的值
【发布时间】:2015-12-12 05:56:37
【问题描述】:
{"username":"john",
"Location":"India"} 

我只有使用 JSON 对象的 WCF 服务,但我不知道从没有 JSON 数组的情况下获取价值。请帮助任何想法如何使用 android 获取价值 JSON

【问题讨论】:

    标签: wcf-data-services android-json android-json-rpc


    【解决方案1】:

    可能对你有帮助

    String fulURL = URL + "/GetLoginDetails/"
                    + mtxt_UserID.getText().toString() + "/"
                    + mtxt_Password.getText().toString() + "/" + deviceId;
            JSONObject jobject = doResponse(fulURL);
    
            if (jobject != null) {
                try {
                    jarray = jobject.getJSONArray("GetCompanyInfo");
                    status = jarray.getString(0);
                } catch (JSONException e1) {
                    // TODO Auto-generated catch block
                    e1.printStackTrace();
                }
    

    【讨论】:

      猜你喜欢
      • 2012-02-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多