This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. 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.
IBM does not intend to provide a solution to this request at this time, so it is being closed.
This request does not align with the strategy for the sample files in QOAR. The source in those files is provided "as is". It can be copied to a source file in your own library and modified as needed.
Regarding the specific requirement to support JSON without a root element, you can make the following changes in a copy of the JSONPARSE source:
For example, copy member JSONPARSE to member JSONPARSE2 in MYLIB/QRPGLESRC. Modify JSONPARSE2 so that it always reports the start of a data structure for a '{' character and it always reports the end of a data structure for a '}' character. Then, when you have a JSON document that begins with the '{' character, specify program %PARSER('JSONPARSE2').
There are two places to change:
1. Remove the IF and ENDIF (and the comment) here:
if parseCtrl.ctrlStk.top > 1;
// If top = 1, this is the initial curly brace to begin
// the JSON document. It does not match an RPG data structure
// So we only report the start of a structure if top > 1
QrnDiStartStruct(parseCtrl.handle);
endif;
2. Remove the IF and ENDIF (and the comment) here:
if parseCtrl.ctrlStk.top > 1;
// If top = 1, it matches the initial curly brace to begin
// the JSON document. It did not match an RPG data structure.
// So we only report the end of a structure if top > 1
QrnDiEndStruct(parseCtrl.handle);
endif;
The CAAC has reviewed this requirement and recommends that IBM not implement this request. As Jon Paris says below, the JSON parser supplied by IBM was never intended as production code. This is similar to the Open Access process where it is assumed that the customer will provide the handler, and that could be done through a vendor or Open Source or yourself.
Background: The COMMON Americas Advisory Council (CAAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CAAC has a key role in working with IBM i development to help assess the value and impact of individual RFEs on the broader IBM i community, and has therefore reviewed your RFE.
For more information about CAAC, see www.common.org/caac
For more details about CAAC's role with RFEs, see http://www.ibmsystemsmag.com/Blogs/i-Can/May-2017/COMMON-Americas-Advisory-Council-%28CAAC%29-and-RFEs/
Nancy Uthke-Schmucki - CAAC Program Manager
The JSON parser supplied by IBM was never intended as production code. It is just an example of how to write a parser. IBM published the code change needed to make this work (it is pretty simple but also stops the current mode from working) - we have the code - we can fix it ourselves - but personally I'd want to use the YAJLINTO parser anyway.