IsJsonValid

Checks the validity of a Json string

  • Free Function
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017

Syntax:

SELECT SQLHTTP.net.IsJsonValid( @Json )

Arguments:

Name Type Description
@Json nvarchar(MAX) Json string

Return Type:

bit

Return Values:

0 = Json is NOT Valid
1 = Json IS Valid

Remarks:

Microsoft introduced the IsJson function starting with SQL Server 2016. This function can be used starting with SQL Server 2008.

Sample Usage:

See Also: