您好,我是 webservices 和 json 的新手,所以我请教您如何在 textView 中显示 JSONStringer 结果。
这是我正在处理的代码:
           // Build JSON string
           JSONStringer TestApp = new JSONStringer().object().key("id")
                        .value("1").key("name").value("manish").key("email")
                        .value("androidhub4you@gmail.com").key("country")
                        .value("india").endObject();
           String entity = new StringEntity(TestApp.toString());
           String var = entity.toString();
显示:
                TextView tv  = (TextView) findViewById (R.id.tvText);
        tv.setText(var);
问题是它只是打印
   org.apache.http.entity StringEntity....
. 非常感谢您的帮助。提前致谢。