public static String toJSONString(Object object, boolean prettyFormat) {
        if (!prettyFormat) {
            return toJSONString(object);
        }

        return toJSONString(object, SerializerFeature.PrettyFormat);
    }
Use the date format in FastJsonConfig to serialize JSON

@param  dateFormat the date format in FastJsonConfigs
@since 1.2.55
src/main/java/com/alibaba/fastjson/JSON.java