import org.json.JSONObject;
public void outJson(Object obj) throws Exception {
JSONObject json = new JSONObject(obj, false);
String rr = json.toString(1);
response.setCharacterEncoding("utf-8");
response.getOutputStream().write(rr.getBytes("utf-8"));
}