ENCODE(XUROOT,XUJSON,XUERR) |
This API is used for converting a local or global
array (M structure) into a JSON object.
Examples:
D ENCODE^XLFJSON("^GLO(99,2)","^TMP($J)")
D ENCODE^XLFJSON("LOCALVAR","MYJSON","LOCALERR")
|
VARIABLES |
TYPE |
VARIABLES DESCRIPTION |
XUROOT |
Input |
Closed array reference for M representation of
object.
|
XUJSON |
Both |
Destination variable for the string array formatted
as JSON.
|
XUERR |
Both |
Contains error messages, defaults to
^TMP("XLFJERR",$J).
|
|
DECODE(XUJSON,XUROOT,XUERR) |
This API is used for converting a JSON object into a
local or global array (M structure).
Examples:
D DECODE^XLFJSON("MYJSON","LOCALVAR","LOCALERR")
D DECODE^XLFJSON("^MYJSON(1)","^GLO(99)","^TMP($J)")
|
VARIABLES |
TYPE |
VARIABLES DESCRIPTION |
XUJSON |
Input |
String/array containing serialized JSON object.
|
XUROOT |
Both |
Closed array reference for M representation of
object.
|
XUERR |
Both |
Contains error messages, defaults to
^TMP("XLFJERR",$J).
|
|
$$ESC(STRING) |
This API is used for converting a text string to a
JSON escaped string.
Example:
W $$ESC^XLFJSON("\one\two\three\") \\one\\two\\three\\
|
VARIABLES |
TYPE |
VARIABLES DESCRIPTION |
STRING |
Input |
String to be escaped to JSON.
|
|
$$UES(STRING) |
This API is used for converting a JSON escaped string
to a unescaped string.
Example:
W $$UES^XLFJSON("\\one\\two\\three\\") \one\two\three\
|
VARIABLES |
TYPE |
VARIABLES DESCRIPTION |
STRING |
Input |
JSON string to be unescaped.
|
|