code: def json_array(
      on_null: JsonOnNull = JsonOnNull.ABSENT, *args
  ) -> Expression:
      """
      Builds a JSON array string from a list of values.
  
      This function returns a JSON string. The values can be arbitrary expressions. The `on_null`
      behavior defines how to treat `NULL` values.
  
      Elements which are created from another JSON construction function call (`json_object`,
      `json_array`) are inserted directly rather than as a string. This allows building nested JSON
      structures.
  
      Examples:
      ::
  
          >>> json_array() # '[]'
          >>> json_array(JsonOnNull.NULL, 1, "2") # '[1,"2"]'
  
          >>> # Expressions as values
          >>> json_array(JsonOnNull.NULL, col("orderId"))
  
          >>> json_array(JsonOnNull.NULL, null_of(DataTypes.STRING()))   # '[null]'
          >>> json_array(JsonOnNull.ABSENT, null_of(DataTypes.STRING())) # '[]'
  
          >>> json_array(JsonOnNull.NULL, json_array(JsonOnNull.NULL, 1)) # '[[1]]'
  
      .. seealso:: :func:`~pyflink.table.expressions.json_object`
      """
      return _varargs_op(
          "jsonArray", *(on_null._to_j_json_on_null(), *args)
      )
  
imports: from typing import Union
  from pyflink import add_version_doc
  from pyflink.java_gateway import get_gateway
  from pyflink.table.expression import Expression, _get_java_expression, TimePointUnit, JsonOnNull
  from pyflink.table.types import _to_java_data_type, DataType
  from pyflink.table.udf import UserDefinedFunctionWrapper
  from pyflink.util.java_utils import to_jarray, load_java_class
label_desc: Use image node_id 55 for calling a global function with example usage: json_array(on_null) and returns: _varargs_op