-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON support #41
Comments
I highly suggest to not implement it that way and add the IBM extension If this project would update to the newer (L)GPL versions then it could integrate any changes that were proposed and/or integrated into GnuCOBOL under (C) Free Software Foundation (the old OpenCOBOL Copyrights were transferred to the FSF under the updated license). |
Thank you for the suggestion. I will look at it. We will discuss licensing within the team. |
I understood that IBM extensions are intuitive operations that correspond to COBOL data types. However, I think that I may be able to use my approach to process JSON irregular data format. I would like to think a little more. In addition, we are discussing about license. |
Especially: it is a "common" extension (adopted by at least MicroFocus and likely also others) you may find in existing sources.
Please elaborate on this.
I totally agree that this is off-topic for this issue, it may be tracked with a different one. |
I understand IBM extensions are used as follows:
IBM extensions insert such JSON data into COBOL data type. But, JSON data is flexible, they have not a data or additional data.
In such cases, the IBM extension will be "ON EXCEPTION". I think I can use that JSON data, because my function can be given a KEY dynamically. |
I just updated the branch, feature/JSON_support. Each function is called by CALL, COBOL Programs hold a JSON object in POINTER type. I think that new functions is more usefull for using flexible JSON data. COBOL sample:
|
Looking at https://www.microfocus.com/documentation/visual-cobol/vc60/DevHub/GUID-BC279EEA-6FE7-4F79-AB8B-062A709E4B34.html it wouldn't. The biggest point to consider the IBM extension: it is already wide adapted, so will ease porting scenarios (and also has a good chance to be added to COBOL 20xx+ [the next standard after the current round]). |
I tried to implement the JSON function.
This function like a environment function with jansson.
DISPLAY JSON-NAME : Specify the name of JSON structure.
DISPLAY JSON-KEY : Register period separated key names.
ACCEPT JSON-VALUE: Gets the value specified by JSON-KEY from JSON-NAME data.
Look at this branch: feature/JSON_support
COBOL sample:
The text was updated successfully, but these errors were encountered: