The ARRAY_TO_JSON function converts a Vantage ARRAY type to a JSON type composed of an ARRAY.
The ARRAY_TO_JSON function only converts Vantage ARRAY types to the JSON type stored as text.
The ARRAY data type is mapped to a JSON-formatted string composed of an array, which can also be a multidimensional array. If the data type of the ARRAY is a numeric predefined type, the array element maps to a numeric type in the JSON instance. For all other types, the value added to the JSON instance is the transformed value of each element of the ARRAY, which is stored in the JSON instance as a string. The JSON array must have the same number of elements as the ARRAY type.
The return type of this function is JSON.
ARRAY_TO_JSON returns NULL if the ARRAY_expr argument is null.