To answer your last question first, RESTful-ness is a characteristic of the interaction between the client and the server. The means by which you parse/process the message data has no bearing on whether or not your API is RESTful.
Within the API client program that you write, you are free to use any technique that you wish to process the JSON message received from the server. If the EXEC CICS TRANSFORM facility provided by CICS isn't a good fit for your application, then use the COBOL PARSE verb. Other options are simply using INSPECT/UNSTRING COBOL statements or LINKing to a program coded in Java and use the class libraries for JSON data.
------------------------------
Leigh Compton
Consulting IT Specialist - CICS and Enterprise Integration
IBM
TX
------------------------------
Original Message:
Sent: Fri December 03, 2021 03:23 AM
From: Ankit Jain
Subject: JSON transform using CICS bundles vs. COBOL JSON PARSE
Hello,
I would like to get some advice on the following.
We have a requirement to connect to a REST API server from our mainframe (COBOL + CICS) online application. For this, we are exploring the built-in CICS JSON Web Services support option: https://www.ibm.com/docs/en/cics-ts/5.6?topic=services-creating-json-web-service-client-application. The REST API server requires the request to be in the form of querystring (which can be done with the CICS WEB CONVERSE/SEND command) and would return the response in JSON format (there are around 8-10 JSON response schemas).
The built-in CICS JSON Web Services option involves creating and installing bundles/mappings for each type of request and response, and then using these bundles to convert the application data to JSON and vice-versa. We are wondering if we can simply use COBOL JSON PARSE for parsing the application data out of the JSON response, rather than using the bundles. We think that creating the bundles/mappings (which in our case would be 8-10 mappings), packaging them to be delivered to our clients for them to install at their site, and maintaining the bundles (if there are any updates to the JSON response schemas) would be more complex than simply using COBOL JSON PARSE.
Are there any advantages of using the transform bundles over COBOL JSON PARSE?
If we use COBOL JSON PRASE instead of the transform bundles, would it not be RESTful?
Thank you.
------------------------------
Ankit Jain
------------------------------