C# Code Insert JSON document file into SQL server Table for JSON Files code example
Example 1: insert json into sql
SELECT *
FROM OPENJSON(@json)
WITH (id int 'strict $.id',
firstName nvarchar(50) 'strict $.info.name',
lastName nvarchar(50) '$.info.surname',
age int,
dateOfBirth datetime2)
Example 2: sql server import json
If (ISJSON(@JSON)=1)
SELECT @JSON AS 'JSON Text'