class JacksonStringSerializer extends JsonSerializer<String> {

    public static final JacksonStringSerializer INSTANCE = new JacksonStringSerializer();

    @Override
    public void serialize(String string, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {<FILL_FUNCTION_BODY>}
}

        if (string != null) {
            // 去除字符串空格
            string = string.trim();
        }
        jsonGenerator.writeString(string);
    
<no_super_class>