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 double quote and/or backslash characters within the text. 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."

Note: This function is equivalent to:

{"}+replace(replace(thetext,{\},{\\}),{"},{"})+{"}

See Also


History

VersionStatusNotes
10.0NewNew in this version.