Escapes characters inside a JSON string representation.
SppJsonEscape([JSON])
Where:
JSON is JSON data as text.
The following characters are escaped in this function:
Rule | Result | Meaning |
---|---|---|
SppJsonEscape(DWVariableColorJSON) | "[\n\t{\n\t\tcolors: \"red\tand\tgreen\" ,\n\t},\n\t{\n\t\tcolors: \"blue\tand\tyellow\" ,\n\t}\n]" | Will convert the JSON string to its escaped JSON string representation. |
The value held in the variable DWVariableColorJSON would look like the example below:
"[ { colors: ""red and green"", }, { colors: ""blue and yellow"", } ]"
See also:
For more information on JSON please see Introducing JSON.