JSON Support for SQL Server

Documentation › ToString

ToString()

Returns the JSON string used to create the JSON data type object.

Example

declare @person json set @person = '{ "Name": "Bob", "Age": 55}' select @person.ToString() as [Person]

Results

Person
{ "Name": "Bob", "Age": 55}