Comma-separated values and escape characters
Use double quotes (") to wrap values with commas when needed. As such, values that start with a double quote character must end with a double quote character, and neither the start quote or end quote are considered to be part of the value.
Values may also contain double quotes. In cases where the value is enclosed in double quotes, any double quote characters must be duplicated.
The escaping logic in pseudocode is as follows:
outputStringForValue = actualValue;
if (actualValue contains "," or actualValue startsWith '"')
outputStringForValue.replaceAll("\"", "\"\"")
outputStringForValue = '"' + outputStringForValue + '"'
Example
Given the following values:
value onevalue "two"value one, two, threevalue with a ","
You can escape these values by as follows:
value one,value "two","value one, two, three","value with a "","""
Note: The REST API escaping implementation conforms to RFC4180. For more information, see https://tools.ietf.org/html/rfc4180.