Jon,

I apologize for the mismatch in data - I was trying to give a simple example.

Here's what the full example would look like...

{
"path": "/path/on/ifs.txt",
"timeout": 0,
"size": 128,
"parms": {
"customer_id": 123,
"invoice_id": 12348,
"due_date" "2019-03-10",
"total_charges" 1234.34
}
}

dcl-ds exampleDS qualified;
path varchar(100);
timeout int(10);
size int(10);
dcl-ds parms;
customer_id int(10);
invoice_id int(20);
due_date char(10);
total_charges decimal(7,2);
end-ds;
end-ds;

Given this structure, obviously when all the data is there it works fine. When parms is null, it essentially says the variable doesn't match the data structure. Interestingly enough, the below structure works - replacing {} or [] instead of nulls.

{
"path": "/path/on/ifs.txt",
"timeout": 0,
"size": 128,
"parms": {
}
}

Ideally, I'd like the nulls to be handled appropriately and not have to fudge the JSON to get around any quirks.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].