LOG IN SIGN UP
Documentation

json.escape()

Escapes characters of a UTF-8 encoded Unicode string using JSON-style escape sequences.

Format

STRING
json.escape(STRING string)

Examples

1
2
3
# var.json is set to: {"city": "london"}
declare local var.json STRING;
set var.json = "{%22city%22: %22" + json.escape(client.geo.city.utf8) + "%22}";