Using JSON functions

SQL Server 2016 introduces JSON data support, and in order to implement this support, four JSON functions have been added to allow the manipulation of JSON data:

  • ISJSON: This checks whether an input string represents valid JSON data.
  • JSON_VALUE: This extracts a scalar value from a JSON string.
  • JSON_QUERY: This extracts a JSON fragment from the input JSON string for the specified JSON path.
  • JSON_MODIFY: This modifies JSON data, updates the value of an existing property, adds a new element to an existing array, inserts a new property and its value, and deletes a property.
  • OPENJSON: This provides a row set view over a JSON document. This table-value function converts JSON text into tabular data.

These functions will be ...

Get SQL Server 2017 Developer's Guide 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.