public void build() { if (loopbackQuery.gsonBuilder == null) { loopbackQuery.gsonBuilder = new GsonBuilder().setPrettyPrinting(); } loopbackQuery .gsonBuilder .registerTypeAdapter(Where.class, new WhereSerializer()) .registerTypeAdapter(Query.Value.class, new ValueSerializer()); gson = loopbackQuery.gsonBuilder.create(); Query.setGson(gson); }
public static void setGsonBuilder(GsonBuilder builder) { loopbackQuery.gsonBuilder = builder; }