@@ -0,0 +1,1509 @@
+/*%0D%0A * To change this template, choose Tools %7C Templates%0D%0A * and open the template in the editor.%0D%0A */%0D%0Apackage com.eas.util;%0D%0A%0D%0A/**%0D%0A *%0D%0A * @author AB%0D%0A */%0D%0Apublic class JSONUtils %7B%0D%0A    public static String s(String aPropValue) %7B%0D%0A        StringBuilder sb = new StringBuilder();%0D%0A        aPropValue = aPropValue == null ? %22null%22 : aPropValue.replace(%22%5C%5C%22, %22%5C%5C%5C%5C%22).replace(%22%5C%22%22, %22%5C%5C%5C%22%22).replace(%22%5Ct%22, %22%5C%5Ct%22).replace(%22%5Cr%22, %22%22).replace(%22%5Cn%22, %22%5C%5Cn%22);%0D%0A        sb.append(%22%5C%22%22).append(aPropValue).append(%22%5C%22%22);%0D%0A        return sb.toString();%0D%0A    %7D%0D%0A%0D%0A    public static StringBuilder p(StringBuilder sb, String aPropName, String aPropValue) %7B%0D%0A        return sb.append(%22%5C%22%22).append(aPropName).append(%22%5C%22%22).append(%22:%22).append(aPropValue);%0D%0A    %7D%0D%0A%0D%0A    public static StringBuilder o(StringBuilder sb, String... aValues) %7B%0D%0A        assert aValues != null && aValues.length %25 2 == 0;%0D%0A        sb.append(%22%7B%22);%0D%0A        for (int i = 0; i %3C aValues.length; i += 2) %7B%0D%0A            if (i %3E 0) %7B%0D%0A                sb.append(%22,%22);%0D%0A            %7D%0D%0A            p(sb, aValues%5Bi%5D, aValues%5Bi + 1%5D);%0D%0A        %7D%0D%0A        sb.append(%22%7D%22);%0D%0A        return sb;%0D%0A    %7D%0D%0A%0D%0A    public static String a(StringBuilder sb, String... aValues) %7B%0D%0A        assert aValues != null;%0D%0A        sb.append(%22%5B%22);%0D%0A        for (int i = 0; i %3C aValues.length; i++) %7B%0D%0A            if (i %3E 0) %7B%0D%0A                sb.append(%22,%22);%0D%0A            %7D%0D%0A            sb.append(aValues%5Bi%5D);%0D%0A        %7D%0D%0A        sb.append(%22%5D%22);%0D%0A        return sb.toString();%0D%0A    %7D%0D%0A%7D%0D%0A

Create JSON utils.