JSON_CHECK Function Examples | Teradata Vantage - JSON_CHECK Examples - Advanced SQL Engine - Teradata Database

JSON Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
gzn1554761068186.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1150
lifecycle
previous
Product Category
Teradata Vantageā„¢

Valid JSON String Argument

The string passed to JSON_CHECK in this query has valid JSON syntax; therefore, the function returns 'OK'.
SELECT JSON_CHECK('{"name" : "Cameron", "age" : 24, "schools" : [ {"name" : "Lake", "type" : "elementary"}, {"name" : "Madison", "type" : "middle"}, {"name" : "Rancho", "type" : "high"}, {"name" : "UCI", "type" : "college"} ], "job" : "programmer" }');

Invalid JSON String Argument

The string passed to JSON_CHECK in this query is not valid JSON syntax; therefore, the function returns the error message: INVALID: Expected something like whitespace or '"' between ',' and the end of the string.

SELECT JSON_Check('{"name" : "Cameron",');