text →
text-to-json-escaped() → text

Returns the escaped contents of a JSON string without surrounding quotation marks. Preserves null, empty, and blank inputs.

Parameters

This function has no parameters.

Behavior

Escapes quotation marks, reverse solidus characters, and control characters required by the JSON string grammar while leaving valid Unicode text readable. Already escaped content is escaped again.

Examples

"He said \"hello\"" | text-to-json-escaped  "He said \\\"hello\\\""

Kind: Function
Scope: text/encoding
Aliases: None


This site uses Just the Docs, a documentation theme for Jekyll.