Add Escape Characters to Text

Verb: escapeData

Adds escape characters to text in plain or JSON format.

Syntax

escapeData --data(String) [--json(Boolean)] (String)=value

Inputs

Script Designer Required AcceptedTypes Description
--data Text Required Text Plain or JSON format text to which the escape characters will be added.
--json Text is JSON Optional Boolean When enabled, it allows the content in the Text parameter to be considered in JSON formatting.

Outputs

Script Designer AcceptedTypes Description
value Escaped Data Text Returns the text with the added escape characters.

Example

Example 1: The command adds escape characters to the text "Characters that convey important information".

defVar --name escapedData --type String
escapeData --data "Characters that convey important information." escapedData=value
logMessage --message "Data converted to escape: ${escapedData}" --type "Info"
// Returns the following output in the console:
// Data converted to escape: Characters%20that%20convey%20important%20information.

Example 2: In this scenario, the command adds escape characters to the text "{" Name ":" John "," LastName ":" Doe "," Age ": 78}", in JSON format.

defVar --name escapedData --type String
escapeData --data "{\"Name\": \"John\", \"LastName\": \"Doe\", \"Age\": 78 }" --json  escapedData=value
logMessage --message "Data converted to escape: ${escapedData}" --type "Info"
// Returns the following output in the console:
// Data converted to escape: "{\"Name\": \"John\", \"LastName\": \"Doe\", \"Age\": 78 }"

See Also

  • Add Escape Characters to Regular Expression
  • Calculate Hash
  • Change Text Case
  • Check File
  • Concatenate Texts
  • Convert HTML to Text
  • Count Occurrences in Text
  • Count Text Characters
  • Create Random Text
  • Create Table By Regular Expression
  • Empty or Null Text Variable
  • Find by Regular Expression
  • Find Occurrences in Text
  • Format Text
  • Get Subtext
  • Get Text from Regular Expression
  • HTML to Markdown
  • Insert New Line to Text
  • Join Text
  • Pad Text
  • Parse URI
  • Remove Diacritics
  • Remove Escape Characters
  • Replace Part of Text
  • Replace Text
  • Split Text
  • Trim Text Blanks