summaryrefslogtreecommitdiffstats
path: root/copy/cepis-json.cpy
diff options
context:
space:
mode:
authorMurilo Ijanc <[email protected]>2026-07-26 12:49:48 -0300
committerMurilo Ijanc <[email protected]>2026-07-26 12:49:48 -0300
commitf979d07d23098b96e758b3feb555cd06d85d9b2d (patch)
tree47298197a17a3d6c438a1f4cc7cb61afd390cf05 /copy/cepis-json.cpy
downloadcobol-f979d07d23098b96e758b3feb555cd06d85d9b2d.tar.gz
Initial importv0.1.0
Diffstat (limited to 'copy/cepis-json.cpy')
-rw-r--r--copy/cepis-json.cpy24
1 files changed, 24 insertions, 0 deletions
diff --git a/copy/cepis-json.cpy b/copy/cepis-json.cpy
new file mode 100644
index 0000000..05e43ea
--- /dev/null
+++ b/copy/cepis-json.cpy
@@ -0,0 +1,24 @@
+*> ---------------------------------------------------------------------
+*> Control block for CEPIS-JSON-GET. Internal.
+*>
+*> Set JS-FROM and JS-TO to the span of the object to search (JS-FROM on
+*> its opening brace) and JS-KEY to the member wanted. On return JS-TYPE
+*> says what was found:
+*>
+*> S string JS-VALUE holds it, escapes already decoded
+*> N number JS-VALUE holds the literal text, for FUNCTION NUMVAL
+*> O object JS-VSTART and JS-VEND span it; search it in turn
+*> A array likewise
+*> B boolean, Z null
+*> space the key is not in this object
+*> E the text is not a JSON object
+*> ---------------------------------------------------------------------
+01 CEPIS-JSON-SCAN.
+ 05 JS-FROM PIC 9(9).
+ 05 JS-TO PIC 9(9).
+ 05 JS-KEY PIC X(32).
+ 05 JS-TYPE PIC X.
+ 05 JS-VALUE PIC X(1024).
+ 05 JS-VALUE-LEN PIC 9(9).
+ 05 JS-VSTART PIC 9(9).
+ 05 JS-VEND PIC 9(9).