decode_url(value)
Parameter | Description | Type | Required | Default Value | Value Range |
url | URL value | string | Yes | - | - |
{"url":"https%3A%2F%2Fcloud.tencent.com%2F"}
fields_set("result",decode_url(v("url")))
{"result":"https://cloud.tencent.com/","url":"https%3A%2F%2Fcloud.tencent.com%2F"}
md5_encoding(value)
Parameter | Description | Type | Required | Default Value | Value Range |
Value | The data for which to calculate the MD5 checksum | String | Yes | - | - |
{"field": "haha"}
fields_set("field", md5_encoding(v("field")))
{"field":"4e4d6c332b6fe62a63afe56171fd3725"}
uuid()
{"key":"value"}
fields_set("field",uuid())
{"field":"8c2db704-45c0-4ea1-9e2c-cf9c966e35cd","key":"value"}
str_encode(data, encoding="utf8", errors="ignore")
Parameter | Description | Type | Required | Default Value | Value Range |
data | Data to be encoded | String | Yes | - | - |
encoding | Encoding format, utf8 by default, supporting ASCII, latin1, and unicode-escape. | String | No | utf8 | - |
errors | Handling method when encoding format cannot recognize characters: ignore (default): Ignore and do not encode. Strict control: Report an error directly and discard this log data. replace: Use a half-angle question mark (?), and replace the unrecognized part. xmlcharrefreplace: Use corresponding XML character references to replace unrecognized parts | String | No | ignore | - |
{"field1": "asd encode encode \\\\u1234"}
fields_set("field2", str_decode(str_encode(v("field1"), "unicode-escape"), "unicode-escape"))
{"field1":"asd encode encode \\\\u1234","field2":"asd code code ሴ"}
str_decode(data, encoding="utf8", errors="ignore")
Parameter | Description | Type | Required | Default Value | Value Range |
data | Data to be decoded | String | Yes | - | - |
encoding | Encoding format, utf8 by default, supporting ASCII, latin1, and unicode-escape. | String | No | utf8 | - |
errors | Handling method when encoding format cannot recognize characters: ignore (default): Ignore and do not decode. Strict control: Report an error directly and discard this log data. replace: Replace the undecodable part with a half-width question mark (?). xmlcharrefreplace: Use corresponding XML characters to replace undecodable parts | String | No | ignore | - |
{"field1": "Test in English and Chinese: qwertyuiopasdfghjklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM special symbols:]] [! @#$%^&*()_++~"}
fields_set("field2", str_decode(str_encode(v("field1"))))
{"field1":"Test in English and Chinese: qwertyuiopasdfghjklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM Special Symbols:]] [! @#$%^&*()_++~", "field2":"Test in English and Chinese: qwertyuiopasdfghjklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM special symbols:]] [! @#$%^&*()_++~"}
base64_encode(value, format="RFC3548")
Parameter | Description | Type | Required | Default Value | Value Range |
value | String to be encoded | string | Yes | - | - |
format | Encoding format, supports RFC4648 (default), RFC3548 | string | No | RFC4648 | - |
{"field": "hello world"}
fields_set("encode", base64_encode(v("field")))
{"encode":"aGVsbG8gd29ybGQ=", "field":"hello world"}
base64_decode(value, format="RFC3548")
Parameter | Description | Type | Required | Default Value | Value Range |
value | The string to be decoded | string | Yes | - | - |
format | Decoding format, supports RFC4648 (default), RFC3548 | string | No | RFC4648 | - |
{"field": "aGVsbG8gd29ybGQ="}
fields_set("decode", base64_decode(v("field")))
{"decode":"hello world", "field":"aGVsbG8gd29ybGQ="}
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback