Hi,
Any sample on how to read a JSON file and using JSON PARSE?
Regards
------------------------------
Juan Manuel Urraburu
Director, Information Technology
ProRM Uruguay
Montevideo UY
------------------------------
Hi,
Any sample on how to read a JSON file and using JSON PARSE?
Regards
Hi,
Any sample on how to read a JSON file and using JSON PARSE?
Regards
The documentation Appendix has a simple example. https://mitreattack.microfocus.com/documentation/extend-acucobol/1051/extend-interoperability-suite/GUID-90EF4285-AA64-491A-9425-9142E1146897.html
The documentation Appendix has a simple example. https://mitreattack.microfocus.com/documentation/extend-acucobol/1051/extend-interoperability-suite/GUID-90EF4285-AA64-491A-9425-9142E1146897.html
Docs link for Rocket hosted docs in case Opentext remove the docs that they are hosting (which they are starting to do) https://docs.rocketsoftware.com/bundle/acucobolgt_dg_1051_html/page/GUID-90EF4285-AA64-491A-9425-9142E1146897.html
The documentation Appendix has a simple example. https://mitreattack.microfocus.com/documentation/extend-acucobol/1051/extend-interoperability-suite/GUID-90EF4285-AA64-491A-9425-9142E1146897.html
Hi Stephen,
Thanks, I know it.
What do you propose to read the json file? Because the sample uses fixed data into the program.
Regards,
Hi Stephen,
Thanks, I know it.
What do you propose to read the json file? Because the sample uses fixed data into the program.
Regards,
There is a srtndard, sample/json/jparse.cbl sample which shows that the COBOL program is laying out the data and then parsing it back. Or, take a look at the AcuToWeb atw-jparse example. Both examples show you do need to know how the data is laid out in order to parse it. That atw-jparse examples is using JSON data that's hosted on a web site, and the data types are defined in the COBOL data division.
01 top-level.
03 coord.
05 lon pic S9(3)V9(4).
05 lat pic S9(3)V9(4).
03 n pic 9(3) value 1.
03 main.
05 temp pic 9(3)v9(1).
05 feels_like pic s9(3)v9(1).
05 temp_min pic 9(3)v9(1).
05 temp_max pic 9(3)v9(1).
05 pressure pic 9(5).
05 humidity pic 9(3).
05 sea_level pic 9(4).
05 grnd_level pic 9(3).
I hope this helps.
The documentation Appendix has a simple example. https://mitreattack.microfocus.com/documentation/extend-acucobol/1051/extend-interoperability-suite/GUID-90EF4285-AA64-491A-9425-9142E1146897.html
What is the minimum Acu version that supports JSON PARSE?
What is the minimum Acu version that supports JSON PARSE?
I believe Version 10.4.0 was the first version to have the JSOB PARSE feature.
I believe Version 10.4.0 was the first version to have the JSOB PARSE feature.
Hi, thanks Steve,
You are right the JSON parse feature was introduced with 10.4.
Regards,
Dominique
Hi,
Any sample on how to read a JSON file and using JSON PARSE?
Regards
I wrote my own callable programs to parse JSON and xml
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.