我有 Jaskcon 的简单序列化程序
public class NullSerializer extends JsonSerializer<Object> {
public void serialize(Object value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
jgen.writeString("");
}
}
编译此代码后,Java 抛出错误
Error:java: java.lang.StackOverflowError
我正在使用这个依赖
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.1</version>
</dependency>
有任何想法吗 ?