jsonscriptstring(
TEXT
)

The jsonscriptstring( function converts text into a JSON string literal


Parameters

This function has one parameter:

text – the original text.


Description

This function converts text into a JSON string literal. To do this the function surrounds the text with double quote characters, and escapes any special characters within the text (for example double quote, slash or backslash characters). Use this function when you need a string literal inside the jsonimport( function or anytime you need to build JSON from Panorama data.

jsonscriptstring({Make text into "JSON literal", including \ characters.})
    ☞ "Make text into \“JSON literal\“, including \\ characters."

See Also


History

VersionStatusNotes
10.2NewFixed so that it works with all special characters that need to be escaped, not just \ and ".
10.0NewNew in this version.