在中介 EI中的中介中,我有一些wso2转换逻辑。在“@type”:“铅”转换为“属性”:{“type”:“铅”}转换时,我一直坚持。
注意:我知道如何使用有效负载工厂来实现这一目标(预期格式)。接收到至少1000 JSONObject下的getFields阵列。
输入:
{
"getDataResponse":{
"result":{
"DataSyncTime":"sometime",
"getFields":[
{
"@type":"Lead",
"FirstName":"Justin"
},
{
"@type":"Lead",
"FirstName":"Manoj"
}
//received atleast 1000 records ie jsonobject here(Dynamic)
],
"Message" :"Text messsage",
"Success":200
}
}}
预期:
{
"DataSyncTime":"sometime",
"getEvents":[],
"getFields":[
{
"attributes":{"type":"Lead"},
"FirstName":"Justin"
},
{
"attributes":{"type":"Lead"},
"FirstName":"Manoj"
}
],
"getTask":[],
"Message" :"Text messsage",
"Success":200
}发布于 2020-01-30 04:41:27
尝试使用Foreach中介器和负载工厂中介器循环遍历数组。如果负载工厂不能满足您的需求,您可能必须使用自定义类中介器来实现您的需求。
https://stackoverflow.com/questions/59962679
复制相似问题