There is no json data type in sql sever, you can just send json as varchar to the stored procedure.
If you want to map json to a table, you can use OPENJSON to convert data to rows and columns .
CREATE PROCEDURE SaveJSON @pID int, @pJson nvarchar(max) AS BEGIN INSERT INTO [YourTable] ([ID] ,[JSONData]) VALUES (@pID ,@pJson) END
If you want to map json objects to a table, you can do this
//json would be something like this [ { "id" : 2,"name": "John"}, { "id" : 5,"name": "John"} ] INSERT INTO YourTable (id,Name) SELECT id, name FROM OPENJSON(@pJson) WITH (id int, name nvarchar(max))
Here is a very good and detailed article in which you will talk in detail about json data
Mairaj
source share