fastjson 带类型的json串
{ "@type": "com.ysxs.dmp.condition.AccessCondition", "child": null, "range": "EVERY_ONE", "labelId": "A01", "endValue": 3, "flowType": [ "_4G" ], "relation": "AND", "startValue": 1, "endCalculation": "LT", "startCalculation": "GT", "hour": [ 1, 2, 3, 4, 5 ], "sss": [ "23", "46" ] }
如果反序列化对象中存在父子关系,使用父类作为parser对象时 ,则序列化顺序导致数据丢失
{ "hour": [ 1, 2, 3, 4, 5 ], "@type": "com.ysxs.dmp.condition.AccessCondition", "child": null, "range": "EVERY_ONE", "labelId": "A01", "endValue": 3, "flowType": [ "_4G" ], "relation": "AND", "startValue": 1, "endCalculation": "LT", "startCalculation": "GT", "sss": [ "23", "46" ] }
该json丢失了hour,如果放到@type后,该数据则不会丢失