Java中类似PHP的var_dump() java 里面如果想实现php 中 var_dump功能,可以用以下方法来代替 Gson gson = new Gson(); System.out.println(gson.toJson(response));