© Peter A. Carter  2018
Peter A. CarterSQL Server Advanced Data Typeshttps://doi.org/10.1007/978-1-4842-3901-8_9

9. Working with the JSON Data Type

Peter A. Carter1 
(1)
London, UK
 

In this chapter, I will discuss the T-SQL functions that allow developers to query JSON data. I will then discuss how JSON data can be indexed.

Querying JSON Data

SQL Server has introduced the JSON_VALUE(), JSON_QUERY(), JSON_MODIFY(), and ISJSON() functions to help developers interrogate and interact with JSON data. The following sections will discuss each of these functions.

Using ISJSON( )

Because JSON data is stored in NVARCHAR(MAX) columns , as opposed to using its own data type, it is very useful to ensure that a tuple contains a valid JSON document, before calling a ...

Get SQL Server Advanced Data Types: JSON, XML, and Beyond now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.