1. Andrew Davis
  2. PowerBuilder
  3. Thursday, 24 March 2022 20:16 PM UTC

I hope someone can help

I need to store the return from my GET statement into a database table

This is the format of the return, what method would you recommend. I am currently using 2019 but can easily move to 2021 if the new features help.

regards and thanks in advance

Andrew

{
"delivery":[
{
"site_id":"BB000001",
"order_number":"220224-1",
"datetime":"2022-02-24T11:32:12",
"action_request":"WASH"
}
],
"tags":[
{
"order_number":"220224-1",
"epc":"300ED89F33500080000EFF48",
"product_desc":"T-36",
"product_type":"Jacket"
},
{
"order_number":"220224-1",
"epc":"300ED89F33500080000EFF5E",
"product_desc":"CDUSK5-M",
"product_type":"Skirt"
},
{
"order_number":"220224-1",
"epc":"300ED89F33500080000F0E02",
"product_desc":"CDMT7-34",
"product_type":"Trouser"
}
],
"wearer":[
{
"epc":"300ED89F33500080000EFF48",
"wearer_department":"Reservations",
"wearer_name":"22 Jose Adea"
},
{
"epc":"300ED89F33500080000EFF5E",
"wearer_department":"Reservations",
"wearer_name":"22 Jose Adea"
},
{
"epc":"300ED89F33500080000F0E02",
"wearer_department":"Reservations",
"wearer_name":"22 Jose Adea"
}
],
"result":[
{
"status":"Success"
}
]

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 24 March 2022 21:03 PM UTC
  2. PowerBuilder
  3. # 1

Hi Andrew;

  Since this is a complex (because it's nested) JSON data stream - you will need to use the JSONParser object to read the data and then use a DC's SetItem() command to load  DWO(s) accordingly as required.

Regards ... Chris

Comment
  1. Matt Balent
  2. Monday, 28 March 2022 18:40 PM UTC
I did a session on JSON parsing at the 2021 Elevate conference. It might give you some pointers on this. It should be available from the Appeon website.
  1. Helpful 1
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.