Class actionCenterJSON
A utility class for manipulation of JSON messages.
Defined in: Utility.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Default constructor.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
actionCenterJSON.logmsgs
A boolean constant denoting whether to log messages to the console.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
actionCenterJSON.getMsgProperty(msg, path)
Queries the specified JSON message using the specified path and returns message contents on the path or null
if the path is invalid.
|
<static> |
actionCenterJSON.getMsgPropertyValue(msg, path)
Queries the specified JSON message using the specified path and returns message contents on the path or null
if the path is invalid.
|
<static> |
actionCenterJSON.makeStringSafe(inputString)
Sanitizes the specified string by replacing special characters by their string-safe equivalents.
|
Field Detail
<static>
{bool}
actionCenterJSON.logmsgs
A boolean constant denoting whether to log messages to the console.
- Default Value:
- false
Method Detail
<static>
actionCenterJSON.getMsgProperty(msg, path)
Queries the specified JSON message using the specified path and returns message contents on the path or null
if the path is invalid.
- Parameters:
- msg
- a JSON message
- {String} path
- a dot-separated path to a message attribute
- Returns:
- null, if the message is null; or null, if the path is invalid; or the evaluated message on the path contents
<static>
actionCenterJSON.getMsgPropertyValue(msg, path)
Queries the specified JSON message using the specified path and returns message contents on the path or null
if the path is invalid.
- Parameters:
- msg
- a JSON message
- {String} path
- a dot-separated path to a message attribute
- Returns:
- null, if the message is null; or null, if the path is invalid; or the evaluated message on the path contents. If the evaluated message has a value attribute, it's value is returned
<static>
actionCenterJSON.makeStringSafe(inputString)
Sanitizes the specified string by replacing special characters by their string-safe equivalents.
- Parameters:
- {String} inputString
- the string to make safe
- Returns:
- a string-safe equivalent