Skip to Content
0
Aug 30, 2018 at 01:36 PM

REST RECEIVER CHANNEL: XML TO JSON CONVERSION

172 Views

HI all,

I have a synchronous scenario. ECC --> PI --> REST --> PI --> ECC

In the Rest request, I have an item node with 0..unbounded occurrence. So, it can have either multiple items or single item.

Receiver REST communication channel is converting XML to JSON. However, when item has only a single record, the JSON strucutre is not right. It appears like this:

"Item" : { "ItemId" ; "1", "ItemDescription" ; "abc"}

and it should be like this:

"Item" : [ { "ItemId" ; "1", "ItemDescription" ; "abc" } ]

I know there is an enhanced JSON conversion for sender REST channel but I don't see a similar option with request for receiver REST synchronous scenario.

How is this possible with PI?

Thanks and regards

Carme