pyflink.table.expressions.json_string#
- json_string(value) pyflink.table.expression.Expression [source]#
Serializes a value into JSON.
This function returns a JSON string containing the serialized value. If the value is NULL, the function returns NULL.
Examples:
>>> json_string(null_of(DataTypes.INT())) # None >>> json_string(1) # '1' >>> json_string(True) # 'true' >>> json_string("Hello, World!") # '"Hello, World!"' >>> json_string([1, 2]) # '[1,2]'
New in version 1.12.0.