【发布时间】:2022-08-17 00:33:41
【问题描述】:
我正在尝试将以下 json 有效负载转换为具有字段名称作为字段值的 json 有效负载:
你能帮忙提供一下jold规范吗?
输入 JSON 负载:
{
\"action\": {
\"allowPartialSuccess\": false,
\"records\": [
{
\"recordid\":\"a4c6364e-4446-47d0-b014-c20ca014fdb3\",
\"ShipToCustomerTextualAddress__c\": \"TestAddress1\",
\"ResellerPO__c\": \"TestAddress1\",
\"InvoiceCDBID__c\": \"TestAddress1\"
},
{
\"recordid\":\"73781a94-9660-4f69-9bde-f2bf1991317d\",
\"ShipToCustomerTextualAddress__c\": \"TestAddress2\",
\"ResellerPO__c\": \"TestAddress2\",
\"InvoiceCDBID__c\": \"TestAddress2\"
}
],
\"type\": \"update\"
}
}
输出有效载荷:
{
\"action\": {
\"allowPartialSuccess\": false,
\"records\": {
\"a4c6364e-4446-47d0-b014-c20ca014fdb3\": {
\"ShipToCustomerTextualAddress__c\": \"TestAddress1\",
\"ResellerPO__c\": \"TestAddress1\",
\"InvoiceCDBID__c\": \"TestAddress1\"
},
\"73781a94-9660-4f69-9bde-f2bf1991317d\": {
\"ShipToCustomerTextualAddress__c\": \"TestAddress2\",
\"ResellerPO__c\": \"TestAddress2\",
\"InvoiceCDBID__c\": \"TestAddress2\"
}
},
\"type\": \"update\"
}
}