JSON Compatibility with the VECTOR Data Type
The JSON data type supports the VECTOR type as a
JSON scalar type. A VECTOR instance is convertible to a JSON type instance
and vice versa using the JSON constructor and the VECTOR constructor,
respectively.
Note that when converting a JSON array to a VECTOR type instance, the
numbers in the JSON array do not have to be of the same numeric type. The input data
types do not change the default numeric type for the vector and the
VECTOR constructor includes an argument to set the format. Using
the VECTOR constructor (or TO_VECTOR) with a JSON data
type instance will succeed as long as there is no conversion error.
The following SQL/JSON functions and item methods are compatible for use with the
VECTOR data type:
JSON_VALUEJSON_OBJECTJSON_ARRAYJSON_TABLEJSON_SCALARJSON_TRANSFORMJSON_SERIALIZEtype().vector().string().stringify()
See Also:
- Oracle AI Database JSON
Developer’s Guide for more information about
VECTORas a data type for JSON data - Oracle AI Database JSON
Developer’s Guide for information about SQL/JSON
path expression item methods, including
vector()
Parent topic: Use SQL Functions for Vector Operations