Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
These functions can be used to convert values between JSON data types and encodings.
Converts the parameter to a boolean. This function supports parameters of type number, string, and Boolean. Similar to booleans in JavaScript, any value except 0
or 'false'
returns true
.
The following example returns true
:
"[bool(1)]"
The following example returns false
:
"[bool(0)]"
The following example returns true
:
"[bool(true)]"
The following example returns true
:
"[bool('true')]"
Decodes the parameter from a base-64 encoded string. This function supports parameters only of type string.
The following example returns "Contoso"
:
"[decodeBase64('Q29udG9zbw==')]"
Decodes the parameter from a URL encoded string. This function supports parameters only of type string.
The following example returns "https://portal.azure.cn/"
:
"[decodeUriComponent('https%3A%2F%2Fportal.azure.cn%2F')]"
Encodes the parameter to a base-64 encoded string. This function supports parameters only of type string.
The following example returns "Q29udG9zbw=="
:
"[encodeBase64('Contoso')]"
Encodes the parameter to a URL encoded string. This function supports parameters only of type string.
The following example returns "https%3A%2F%2Fportal.azure.cn%2F"
:
"[encodeUriComponent('https://portal.azure.cn/')]"
Converts the parameter to a floating-point. This function supports parameters of type number and string.
The following example returns 1.0
:
"[float('1.0')]"
The following example returns 2.9
:
"[float(2.9)]"
Converts the parameter to an integer. This function supports parameters of type number and string.
The following example returns 1
:
"[int('1')]"
The following example returns 2
:
"[int(2.9)]"
Converts the parameter to a native type. In other words, this function is the inverse of string()
. This function supports parameters only of type string.
The following example returns 1
:
"[parse('1')]"
The following example returns true
:
"[parse('true')]"
The following example returns [1,2,3]
:
"[parse('[1,2,3]')]"
The following example returns {"type":"webapp"}
:
"[parse('{\"type\":\"webapp\"}')]"
Converts the parameter to a string. This function supports parameters of all JSON data types.
The following example returns "1"
:
"[string(1)]"
The following example returns "2.9"
:
"[string(2.9)]"
The following example returns "[1,2,3]"
:
"[string([1,2,3])]"
The following example returns "{"type":"webapp"}"
:
"[string({\"type\":\"webapp\"})]"
- For an introduction to Azure Resource Manager, see Azure Resource Manager overview.