fastjson JSON数据转Object时,如何处理key对应值为null情况,比如转成Double

rsl1atfo  于 2021-11-27  发布在  Java
关注(0)|答案(1)|浏览(372)
AgreementUserResult agreementUserResult = JSON.parseObject(result,
							new TypeReference<AgreementUserResult>() {
							});

实体

private Double priorAccumulativeAmount;

如何处理为null时,给个默认值

kh212irz

kh212irz1#

@heyzhuyue
JSONObject.java
public double getDoubleValue(String key)

相关问题