Hi,
One of the 3rd party systems that we integrate to needs some JSON objects to be array objects irrespective of whether one or more values are passed to it. Does SAP PI REST Adapter support this? If so how? Are there any tweaks that can be done to achieve this?
{
"Items": [
{
"KDS": [
{
"DimRole": "Prod",
"DimLvl": "PROD_DES",
"DimVal": "XXOOIIRP Fibre"
}
],
"Tag": "amendments"
}
]
}
In the above Json, the object KDS is needed by the target system as an array. SAP PI by default looks at the number of KDS that are passed and if there are only 1 set, then it puts only {} around the value for the object. The target system requires that SAP PI always puts the {} as well as the [] for the value of the object.
SAP PI correctly puts both the {} and the [] around the values in case more than one KDS sets are passed and this is processed correctly by the target application.
Please help with a solution for this.