Validate JSON Input Parameters

You can optionally validate the structure of your JSON input to the DBMS_VECTOR.UTL and DBMS_VECTOR_CHAIN.UTL functions, which use JSON to define their input parameters.

The JSON data is schemaless, so the amount of validation that Vector Utility package APIs do at runtime is minimal for better performance. The APIs validate only the mandatory JSON parameters, that is, the parameters that you supply for the APIs to run (not optional JSON parameters and attributes).

Before calling an API, you can use subprograms in the DBMS_JSON_SCHEMA package to test whether the input data to be specified in the PARAMS clause is valid with respect to a given JSON schema. This offers more flexibility and also ensures that only schema-valid data is inserted in a JSON column.

Validate JSON input parameters for the DBMS_VECTOR.UTL and DBMS_VECTOR_CHAIN.UTL functions against the following schema:

Examples:

Related Topics