15.10 - Examples: JSON_CHECK - Teradata Database

Teradata Database Teradata JSON

Product
Teradata Database
Release Number
15.10
Published
December 2015
Language
English (United States)
Last Update
2018-06-05
dita:mapPath
TeradataJSON_15_10.ditamap
dita:ditavalPath
ft:empty

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",');