Question

1
Replies
27
Views
Close popover
arka bhattacharya (arkab530)
Mercedes benz

Mercedes benz
IN
arkab530 Member since 2020 5 posts
Mercedes benz
Posted: December 2, 2020
Last activity: December 3, 2020

JSON list issue in connect-REST

Hi,

When Pega retrieves the response of a REST service, it transforms the JSON List items into multiple single items(e.g. "TARes":{}). 

This happens even before the data-mapping is done, we're able to validate this by running the request JSON in the Connect-Rest wizard. 

However, the same request returns a proper JSON list ( with "TARes": [])  when run over other clients like SOAP-UI. 

Please confirm if I'm missing something or if this is a known product issue.

Sample Accurate response->

{
  "TARes": [
    {
      "TAId": "xfg12393259123",
      "CInc": "5",
      "TASt": [
        {
          "LURes": "B_R11"
        },
        {
          "LURes": "B_R11"
        }
      ]
    },
    {
      "TAId": "xfg123asfd59123",
      "CInc": "15",
      "TASt": [
        {
          "LURes": "B_R11"
        }
      ]
    },
    {
      "TAId": "xfg1df6s9123",
      "CInc": "25",
      "TASt": [
        {
          "LURes": "B_R11"
        },
        {
          "LURes": "B_R11"
        },
        {
          "LURes": "B_R11"
        }
      ]
    }
  ]
}

Pega retrieves the same JSON as 

{
  "TARes": {
    "TAId": "xfg12393259123",
    "CInc": "5",
    "TASt": {
      "LURes": "B_R11"
    },
    "TASt": {
      "LURes": "B_R11"
    }
  },
  "TARes": {
    "TAId": "xfg123asfd59123",
    "CInc": "15",
    "TASt": {
      "LURes": "B_R11"
    }
  },
  "TARes": {
    "TAId": "xfg1df6s9123",
    "CInc": "25",
    "TASt": {
      "LURes": "B_R11"
    },
    "TASt": {
      "LURes": "B_R11"
    },
    "TASt": {
      "LURes": "B_R11"
    }
  }
}

 

Pega Platform 8.2.8 Data Integration Financial Services Senior System Architect