class JsonKit {

    private static final Gson gson;

    static {
        gson = new GsonBuilder()
                .disableHtmlEscaping()
                .registerTypeAdapter(LocalDate.class, new JsonKit.LocalDateAdapter())
                .registerTypeAdapter(LocalDateTime.class, new JsonKit.LocalDateTimeAdapter())
                .registerTypeAdapter(new TypeToken<Map<String, Object>>() {
                }.getType(), new MapDeserializerDoubleAsIntFix())
                .create();
    }

    public String toString(Object object) {
        return toJson(object);
    }

    public static <T> T fromJson(String json, Class<T> clazz) {
        if (StringKit.isEmpty(json)) return null;
        if (clazz == null) {
            return gson.fromJson(json, new TypeToken<Map<String, Object>>() {
            }.getType());
        }
        return gson.fromJson(json, clazz);
    }

    public static <T> T fromJson(String json, Type typeOfT) {
        if (StringKit.isEmpty(json)) return null;
        return gson.fromJson(json, typeOfT);
    }

    public static <T> T fromJson(String json, TypeToken<T> typeRef) {
        if (StringKit.isEmpty(json)) return null;
        return gson.fromJson(json, typeRef.getType());
    }

    public static <T> String toJson(T value) {
        if (value == null) return null;
        if (value instanceof String) return (String) value;
        return gson.toJson(value);
    }

    public static <T> String toJson(T value, boolean pretty) {<FILL_FUNCTION_BODY>}

    public static <T> String toJson(T value, final String... ignorePropertyNames) {
        if (null == ignorePropertyNames) return toJson(value);
        return new GsonBuilder()
                .excludeFieldsWithModifiers(Modifier.STATIC)
                .excludeFieldsWithModifiers(Modifier.TRANSIENT)
                .addSerializationExclusionStrategy(new PropertyNameExclusionStrategy(ignorePropertyNames))
                .create()
                .toJson(value);
    }

    public static GsonBuilder newBuilder() {
        return gson.newBuilder();
    }

    final static class LocalDateAdapter implements JsonSerializer<LocalDate>, JsonDeserializer<LocalDate> {

        @Override
        public JsonElement serialize(LocalDate date, Type typeOfSrc, JsonSerializationContext context) {
            return new JsonPrimitive(date.format(DateTimeFormatter.ISO_LOCAL_DATE));
        }

        @Override
        public LocalDate deserialize(JsonElement element, Type type, JsonDeserializationContext context) throws JsonParseException {
            String timestamp = element.getAsJsonPrimitive().getAsString();
            return LocalDate.parse(timestamp, DateTimeFormatter.ISO_LOCAL_DATE);
        }
    }

    final static class LocalDateTimeAdapter implements JsonSerializer<LocalDateTime>, JsonDeserializer<LocalDateTime> {
        @Override
        public JsonElement serialize(LocalDateTime date, Type typeOfSrc, JsonSerializationContext context) {
            return new JsonPrimitive(date.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
        }

        @Override
        public LocalDateTime deserialize(JsonElement element, Type type, JsonDeserializationContext context) throws JsonParseException {
            String timestamp = element.getAsJsonPrimitive().getAsString();
            return LocalDateTime.parse(timestamp, DateTimeFormatter.ISO_LOCAL_DATE_TIME);
        }
    }

//    public Ason<?, ?> toAson(String value) {
//        return defaultJsonSupport.toAson(value);
//    }

}

        if (!pretty) {
            return toJson(value);
        }
        if (value == null) return null;
        if (value instanceof String) return (String) value;
        return gson.newBuilder().setPrettyPrinting().create().toJson(value);
    
<no_super_class>