×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
One of our carriers has a replacement service that returns a json response.
In the response it has a double array defined and I am having trouble defining it in my rpg.
How do I define this correctly?
Section of returned json.
"revenueDetails": [
[
{
"name": "D LIFTGATE",
"description": "DELIVERY LIFTGATE",
"calc_rate": 55,
"revenue_amount": 55,
"freight_class_code": "92.5",
"id": 26
},
{
"name": "Minimum B",
"description": "MINIMUM CHARGE",
"calc_rate": 97,
"revenue_amount": 97,
"freight_class_code": "92.5",
"id": 170
},
{
"name": "Fuel Surc",
"description": "Fuel Surcharge",
"calc_rate": 0.33,
"revenue_amount": 32.01,
"freight_class_code": "92.5",
"id": 68
}
]
],
From yajlgen
num_REVENUEDETAILS int(10) inz(0);
REVENUEDETAILS varchar(1) dim(1); // empty;
From my code
cnt_revenueDetails Int(5);
Dcl-ds revenueDetails Dim(25);
name Char(50);
description Char(100);
calc_rate Packed(7 : 3);
revenue_amount Packed(7 : 2);
freight_class_code Char(5);
id Char(5);
End-Ds;
As an Amazon Associate we earn from qualifying purchases.