XLFJSON ;SLC/KCM/TJB - Decode/Encode JSON ;26 Oct 2016
Source file <XLFJSON.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
DECODE(XUJSON,XUROOT,XUERR) |
|
|
ENCODE(XUROOT,XUJSON,XUERR) | ; XUROOT (M structure) --> XUJSON (array of strings)
; Examples: D ENCODE^XLFJSON("^GLO(99,2)","^TMP($J)") ; D ENCODE^XLFJSON("LOCALVAR","MYJSON","LOCALERR") |
|
ESC(X) | ; Escape string for JSON
; X: Required; String to be escaped |
|
UES(X) | ; Unescape JSON string
; X: Required; String to be unescaped |
|
ERRX(ID,VAL) | ; Set the appropriate error message
; switch (ID) -- XERRX ends statement |
|
XERRX | ; end switch
|
Name | Line Occurrences |
---|---|
XERRX | ERRX+6, ERRX+7, ERRX+8, ERRX+9, ERRX+10, ERRX+11, ERRX+12, ERRX+13, ERRX+14, ERRX+15 , ERRX+16, ERRX+17, ERRX+18, ERRX+19, ERRX+20, ERRX+21, ERRX+22, ERRX+23, ERRX+24, ERRX+25 , ERRX+29, ERRX+30 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
ERRMSG | ERRX+2~, ERRX+6*, ERRX+7*, ERRX+8*, ERRX+9*, ERRX+10*, ERRX+11*, ERRX+12*, ERRX+13*, ERRX+14* , ERRX+15*, ERRX+16*, ERRX+17*, ERRX+18*, ERRX+19*, ERRX+20*, ERRX+21*, ERRX+22*, ERRX+23*, ERRX+24* , ERRX+25*, ERRX+29*, ERRX+30*, ERRX+31*, XERRX+2 |
ID | ERRX~, ERRX+6, ERRX+7, ERRX+8, ERRX+9, ERRX+10, ERRX+11, ERRX+12, ERRX+13, ERRX+14 , ERRX+15, ERRX+16, ERRX+17, ERRX+18, ERRX+19, ERRX+20, ERRX+21, ERRX+22, ERRX+23, ERRX+24 , ERRX+25, ERRX+29, ERRX+30, ERRX+31 |
VAL | ERRX~, ERRX+13, ERRX+14, ERRX+15, ERRX+16, ERRX+17, ERRX+24, ERRX+25, ERRX+29, ERRX+30 , ERRX+31 |
X | ESC~, ESC+2, UES~, UES+2 |
XUERR | DECODE~, ENCODE~, XERRX+1, XERRX+2 |
>> XUERRORS | XERRX+3* |
XUJSON | DECODE~, ENCODE~ |
XUROOT | DECODE~, ENCODE~ |