|
Null values must go to alpha fields, not packed.
You need to check for 'null', if not change to decimal (%dec)
On Tue, Sep 1, 2020 at 10:10 AM (WalzCraft) Jerry Forss <
JForss@xxxxxxxxxxxxx> wrote:
Hi All,
I am using YAJL to consume json from a web service.
It parses the first details element but crashes on the second.
What do I have defined incorrectly?
From json
"details": [
{
"handlingUnits": 1,
"class": "70",
"packaging": "SK",
"isHazardous": false,
"description": "DOOR",
"weight": 55,
"rate": null,
"charges": null
},
{
"handlingUnits": 0,
"class": "FS",
"packaging": "",
"isHazardous": false,
"description": "FUEL SURCHARGE 17.500%",
"weight": 0,
"rate": null,
"charges": null
}
],
My DS looks like
cnt_details Int(5);
Dcl-ds details Dim(25);
handlingUnits Packed(5 : 0);
class Char(5);
packaging Char(100);
isHazarddous Ind;
description Char(100);
weight Packed(5 : 0);
rate Packed(5 : 0);
charges Packed(7 : 2);
End-Ds;
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.