|
From: Don Brown via WEB400 <web400@xxxxxxxxxxxxxxxxxx>the
To: web400 (web400@xxxxxxxxxxxxxxxxxx) <web400@xxxxxxxxxxxxxxxxxx>
Cc: Don Brown <DBrown@xxxxxxxxxx>
Date: 11/11/2019 11:58 PM
Subject: [EXTERNAL] [WEB400] JSON Formatting opinion
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>
Hi Group,
We are working with a third party to process transactions and receive
data in JSON.no
Recently we received an error using DATA-INTO. Strange thing was it
worked on one system but not on another so we have scheduled to get the
two systems on the same PTF levels.
Anyway the JSON data looks like this;
If account details are provided we get something like this ...
"account": {
"id": 36682,
"name": "HEALTH",
"ref": "45010",
"active": "1",
"type": "INVOICE",
"pin": "",
"prepaid": 0
},
If no account details are present we get ...
"account": [],
We would have expected it to look like:
"account": {},
The third part replied with the following;
We have some stuff like this, things return an object, but if there its
object its an empty array. When using this in PHP its fine but otherset
languages it will cause problems. We can queue it up for a fix. Maybe
it as account: null instead of account: {}provided
Just wondering on an opinion if you think the null account being
as an array is valid or not or how you would address this.
We are using YAJLINTO as the parser.
Don Brown
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.