阅读背景:

将自定义异常序列化为JSON,并非所有字段都已序列化

来源:互联网 

I'm trying to serialize a custom Exception in Java using writeValueAsString() method from Jackson library. I intend to send it by HTTP to another machine. This is working partialy because not all fields are included in JSON after serialize. The top level exception Throwable implements Serializable interface, and also has some constructors that add info about what is to be serialized. I suppose the truth is somewhere here. Please help with some advices. Here is my custom exception code:I'm trying to serialize a custom Exception in J




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: