Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 746 Bytes

File metadata and controls

25 lines (15 loc) · 746 Bytes

Escape for JSON

Escape for JSON

Overview

Escapes string for JSON. Converts characters that have special meaning in JSON string literals (such as double quotes, backslashes, and control characters) into their JSON escape sequences so the string can be safely embedded in a JSON value.

Parameters

1. sourceString (TEXTAREA)

  • Label: Source string
  • Description: The input string to escape for safe embedding in a JSON string value.
  • Required: Yes
  • Default: None
  • Constraints: None

Output

Returns a STRING containing the JSON-escaped value.

Exceptions

Throws BotCommandException on invalid input or internal failure.