March 2018
Intermediate to advanced
816 pages
19h 35m
English
The JSON_VALUE function extracts a scalar value from a JSON string. It accepts two input arguments:
The return type of the function is nvarchar(4000), with the same collation as in the input expression. If the extracted value is longer than 4,000 characters, the function returns NULL provided the path is in lax mode, or an error message in the case of strict mode.
If either the expression or the path is not valid, the JSON_VALUE function returns an error explaining that the JSON text is not properly formatted.
The following example shows the