Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
34
Task/JSON/OpenEdge-Progress/json.openedge
Normal file
34
Task/JSON/OpenEdge-Progress/json.openedge
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/* using a longchar to read and write to, can also be file, memptr, stream */
|
||||
DEFINE VARIABLE lcjson AS LONGCHAR NO-UNDO.
|
||||
|
||||
/* temp-table defines object, can also be dataset */
|
||||
DEFINE TEMP-TABLE example
|
||||
FIELD blue AS INTEGER EXTENT 2
|
||||
FIELD ocean AS CHARACTER
|
||||
.
|
||||
CREATE example.
|
||||
ASSIGN
|
||||
example.blue [1] = 1
|
||||
example.blue [2] = 2
|
||||
example.ocean = "water"
|
||||
.
|
||||
/* write-json to put result in lcjson, true indicates formatted */
|
||||
TEMP-TABLE example:DEFAULT-BUFFER-HANDLE:WRITE-JSON( "LONGCHAR", lcjson, TRUE ).
|
||||
|
||||
/* display result */
|
||||
MESSAGE
|
||||
STRING( lcjson )
|
||||
VIEW-AS ALERT-BOX.
|
||||
|
||||
/* empty results */
|
||||
EMPTY TEMP-TABLE example.
|
||||
|
||||
/* read-json to get result from lcjson */
|
||||
TEMP-TABLE example:DEFAULT-BUFFER-HANDLE:READ-JSON( "LONGCHAR", lcjson ).
|
||||
|
||||
FIND example.
|
||||
/* display results */
|
||||
MESSAGE
|
||||
example.blue [1] example.blue [2] SKIP
|
||||
example.ocean
|
||||
VIEW-AS ALERT-BOX.
|
||||
Loading…
Add table
Add a link
Reference in a new issue