is json
test… is json [array|object|scalar]
The isjson
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.
is json
: 1 for JSON arrays and objects onlyis json
: 1 for JSON numbers and strings onlySimilar to the is json
test of standard SQL isjson
allows objects to contain the same key several times.
{"a": 42,
"a": 1}
Microsoft SQL Server: ISJSON (Transact-SQL)
T832, “SQL/JSON path language: item method”
.type()
item method
The isjson
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 »