From SQL Server 2016 onwards you can export query statements to JSON format. JSON is the popular text data format used to exchange data in modern web and mobile applications.

To execute the output query statement whose data type is JSON, you can do the following.

select ProductID, ProductName, UnitPrice
from Products
for json auto

You can see the JSON data after performing the query as follows.

[{"ProductID":1,"ProductName":"Chai","UnitPrice":18.0000},{"ProductID":2,"ProductName":"Chang","UnitPrice":19.0000},{"ProductID","ProductName":"Aniseed Syrup","UnitPrice":10.0000},{"ProductID":4,"ProductName":"Chef Anton's Cajun Seasoning","UnitPrice":22.0000},{"ProductID":5,"ProductName":"Chef Anton's Gumbo Mix","UnitPrice":21.3500}]