杂七杂八 Gson格式化输出JSON字符串 Gson gson = new GsonBuilder().setPrettyPrinting().create(); String jsonOutput = gson.toJson(someObject); Reference gson Compact Vs. Pretty Printing for JSON Output Format Gson格式化输出JSON字符串