private static Gson createGSON(boolean exclude) {
   GsonBuilder builder = new GsonBuilder();
   builder.setDateFormat(YYYY_MM_DD_HH_MM_SS);
   if (exclude) {
     builder.setExclusionStrategies(exludeServer, exludeAll);
   } else {
     builder.setExclusionStrategies(exludeAll);
   }
   Gson gson = builder.create();
   return gson;
 }
Example #2
0
 public static GsonBuilder buildJsonParser() {
   final GsonBuilder builder = new GsonBuilder();
   builder.setExclusionStrategies(new SkipStrategy());
   builder.setDateFormat("dd/MM/yyyy HH:mm:ss");
   return builder;
 }