Json Structure
Question

I have below json to post to Rest API and I am creating structure in Outsystems but it is not taking  "addOns":[].

how I can achieve this?


{

   "makeCode":"11",

   "modelCode":"1062",

   "productCode":"2312",

   "RTOCode":"567",

   "registrationDate":"2018-11-03T00:00:00",

   "previousPolicyClaimed":true,

   "previousPolicyNcbPercentage":20,

   "previousPolicyExpiryDate":"2021-08-27T23:59:59",

   "previousInsurerCode":"PHONEPE_ORIENTAL_INSURANCE",

   "previousPolicyNumber":"weur82wh",

   "isUserPACovered":true,

   "PACoverDuration":0,

   "IDVType":"MIN",

   "packages":null,

   "addOns":[],

   "activeTpStartDate":"2018-11-03T00:00:00",

   "activeTpEndDate":"2026-11-07T00:00:00",

   "activeTpInsurerCode":"jwjkda",

   "activeTpPolicyNumber":"bdwvkjs",

   "pincode":"500006",

   "requestId":"Harshad1"

}



Hi Harshad,

Try including an example of the kind of object the addOns array contains. "addOns": [] only tells OutSystems that addOns is an array, but not an array of what kind. It could be an array of integers, an array of strings, or an array of something completely different. Without that information, OutSystems is not able to generate the structure.

Kind regards,
Jeroen

Champion

Hi Harshad,
Here's something that has been posted earlier &I had suggested an approach there.

https://www.outsystems.com/forums/discussion/72608/jsondeserialize-returning-error/


Hope it helps,
Assif

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.