[alibaba/fastjson]json解析

2024-09-06 460 views
1

对象嵌套一个list 对象解析时会存在问题

回答

8

提供下复现代码。

8

public class FlowRepayTrailResult extends FlowBaseResult {

private Integer status;

private String desc;

private BigDecimal dueTotalAmount;

private List<FlowRepayPlanItem> repayDetails;

}

@Data public class FlowRepayPlanItem {

private BigDecimal dueAmount;

private BigDecimal duePrincipal;

private BigDecimal dueInterest;

private BigDecimal dueGuaranteeFee;

private String actDateTime;

}

就是这样格式的实体类没解析出来

5

大约json格式 { "a": 1, "b": 2, "c": [{ "a": 1, "b": 2 }, { "a": 1, "b": 2 }] }