JSON_Encode

(System Library)

Deprecated. This is now a wrapper for JSONEncode

Description: Takes a VTScada dictionary, structure or array which may be nested, and encodes it as JSON.
Returns: Text
Usage: Script Only.
Function Groups: String and Buffer
Related to: JSONParse
Format: System.JSON_Encode(Input[, PrettyPrint])
Parameters:
Input
Required. Any stream expression for the socket. If this isn't a socket stream, invalid is returned.
PrettyPrint
Optional Boolean. If TRUE, the output will have white space and line breaks added for presentation. Default to FALSE.
Comments:

The return value will be the input encoded as JSON. Text will be encoded as UTF-8, unless there are any sequences of bytes in the input string that cannot be represented as UTF-8, in which case the string will be substituted for JSON null.

VTScada value types that are not dictionaries, arrays or structures, and that do not have a string or numeric representation, will be represented as JSON null.