【发布时间】:2023-04-04 03:38:01
【问题描述】:
在以下情况下苦苦挣扎。任何指导/意见将不胜感激。
输入负载:
{
"message": "Bad request :/data/1/actualDelivery expected type: String, found: Null\n
/data/1/propertyName expected type: String, found: Null\n
/data/1/uniqueID expected type: String, found: Null\n
/data/0/amortizationSchedule expected type: String, found: Null\n
/data/0/uniqueID expected type: String, found: Null\n
/metadata/guid expected type: String, found: Null\n
/metadata/partnerName expected type: String, found: Null\n
/datasetName expected type: String, found: Null"
}
预期输出:
{
"datasetName":" expected type: String, found: Null"
"metadata":{
"partnerName":" expected type: String, found: Null",
"guid" : " expected type: String, found: Null"
},
"data": [
{
"uniqueID" : " expected type: String, found: Null",
"amortizationSchedule":" expected type: String, found: Null",
},
{
"uniqueID" : " expected type: String, found: Null",
"propertyName":" expected type: String, found: Null",
"actualDelivery": " expected type: String, found: Null"
}
]
}
输入中的字段数量可能会有所不同,或者某些字段可能不存在; 数据集、合作伙伴名称、guiid 也有可能在输入中不存在。在这种情况下,只需要显示可用字段,即
{
"data": [
{
"uniqueID" : " expected type: String, found: Null",
"amortizationSchedule":" expected type: String, found: Null",
},
{
"uniqueID" : " expected type: String, found: Null",
"propertyName":" expected type: String, found: Null",
"actualDelivery": " expected type: String, found: Null"
}
]
}
【问题讨论】: