Here you can find the source of pakJson(String json, String... jsons)
public static String pakJson(String json, String... jsons)
//package com.java2s; public class Main { public static String pakJson(String json, String... jsons) { StringBuilder sBuilder = new StringBuilder(); json = json.substring(0, json.length() - 1); sBuilder.append(json);/* w w w. j a v a 2 s . c o m*/ for (int i = 0; i < jsons.length; i++) { sBuilder.append(","); sBuilder.append(jsons[i].subSequence(1, jsons[i].length() - 1)); } sBuilder.append("}"); return sBuilder.toString(); } }