View previous topic :: View next topic
|
Author |
Message |
ankit.jain
New User
Joined: 02 Jul 2009 Posts: 18 Location: Mumbai
|
|
|
|
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: 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? I don't think so but wanted to check.
Thank you,
Ankit Jain |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
Back to top |
|
|
ankit.jain
New User
Joined: 02 Jul 2009 Posts: 18 Location: Mumbai
|
|
|
|
Thanks Rohit for your quick reply!
I got a reply in another forum that says, "The means by which you parse/process the message data has no bearing on whether or not your API is RESTful."
It further says, "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."
Therefore, we will be moving forward with using COBOL JSON PARSE here.
Thanks again, |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Looks righty , Good Luck 👍 |
|
Back to top |
|
|
|