Open qyvlik opened 5 years ago
临时解决方案如下,将 DepthItemChange 中的 BigDecimal 类型都修改为 String 类型。
@JSONType(orders =
{
"id",
"side",
"action",
"price",
"amount"
},
serialzeFeatures = SerializerFeature.BeanToArray,
parseFeatures = Feature.SupportArrayToBean)
public static class DepthItemChange {
private Long id;
private Integer side;
private String action;
private String price;
private String amount;
}
fastjson 使用
BeanToArray
可以正常序列化,使用SupportArrayToBean
反序列化却报错 fastjson 版本:如下是 testcase
报错输出: