This portal is to open public enhancement requests against IBM Z Software products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
See this idea on ideas.ibm.com
Many RESTful services return results with a top-level array. EGL does not support converting this JSON to record. (IBM Support case TS013710542 was opened on this issue with the recommendation following from IBM that and RFE be created.)
In EGL under versions 9.6.0 and 9.7.0, generated to Java, we are not able to get the ServiceLib.convertToJSON function to convert to an object array. Here is a simple example to illustrate our need:
record Person
firstname string;
lastname string;
end
program TestJSON type BasicProgram(parm1 int, parm2 string) {}
function main()
try
// Just a Person, no array
person1 Person;
json1 string = "{ \"firstname\": \"Dan\", \"lastname\": \"Darnell\" }";
ServiceLib.convertFromJSON(json1, person1);
SysLib.writeStdout(person1.firstname + " " + person1.lastname);
// A Person inside a top-level array
person2 Person[0];
json2 string = "[{ \"firstname\": \"Dan\", \"lastname\": \"Darnell\" }]";
ServiceLib.convertFromJSON(json2, person2);
SysLib.writeStdout(person2[1].firstname + " " + person2[1].lastname);
onException(aException AnyException)
SysLib.writeStdout(aException.messageID + " " + aException.message);
end
end
end
--------------------------------------------------------------
The first part, with just a Person object works fine and just as we expected it to.
The second part, where the JSON contains an array, doesn't map to our Person array.
Here is the output:
Dan Darnell
EGL1561E EGL1561E Service library JSON conversion functions operate on a Record or Dictionary. com.ads.woocommerce.Person[] is not a supported type.
EGL0002I The error occurred in TestJSON processing the main function.
Desired functionality:
The desired functionality is for the convertFromJSON function to handle top-level arrays when mapping to record parts.
Idea priority | Medium |
By clicking the "Post Comment" or "Submit Idea" button, you are agreeing to the IBM Ideas Portal Terms of Use.
Do not place IBM confidential, company confidential, or personal information into any field.
A preliminary evaluation of this request indicates that it is consistent with our business strategy. Further evaluation of this RFE is underway.