is json
testThe json_valid
function returns 1 if the argument string contains valid JSON. Otherwise it returns null
if the input was null
or 0 for any non-null
non-JSON value.
Similar to the is json
test of standard SQL json_valid
allows objects to contain the same key several times.
{"a": 42,
"a": 1}
MariaDB: JSON_VALID
MySQL: Functions That Return JSON Value Attributes: JSON_VALID
SQLite: The json_valid() function (also a two-argument form)
T832, “SQL/JSON path language: item method”
.type()
item method
The json_valid
function is not covered by the international SQL standard ISO/IEC 9075-2:2023.
You can’t catch up on 20 years of SQL evolution in one day. Subscribe the newsletter via E-Mail, Bluesky or RSS to gradually catch up and to keep modern-sql.com on your radar.
The essence of SQL tuning in 200 pages
Buy now!
(paperback and/or PDF)
Paperback also available at Amazon.com.
Markus offers SQL training and consulting for developers working at companies of all sizes.
Learn more »