BSON_VALIDATE
The BSON_VALIDATE function checks whether the specified data BLOB represents a valid JSON data.
The schema is SYSTOOLS.
- json-value
- A BLOB column of a base table. The json-value value must contain a BSON representation of a JSON document.
The function returns a value of 1 if the record is a valid representation of correctly formatted JSON, or a zero otherwise.
Db2® has no native JSON data type, so there is no validation that is done against the contents of a BLOB column that contains JSON data. If the JSON object is under program control and you are using the JSON2BSON and BSON2JSON functions, you are probably not going to run across problems with the data.