Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
How can i parse a JSON string which comes as a parameter to a stored procedure and get all the name value pairs into a temp table in sql server.
Posted
Comments
DamithSL 3-Aug-15 6:44am    
can you update the question with sample json string?

1 solution

There is no built-in support for that...Also SQL server not to good to handle complex string manipulations so it can be a bit pain to parse JSON...
However there is a nice article about it here: https://www.simple-talk.com/sql/t-sql-programming/consuming-json-strings-in-sql-server/[^]
An other option is to use CLR: http://www.sqlservercentral.com/articles/SQLCLR/74160/[^]
 
Share this answer
 
Comments
[no name] 3-Aug-15 11:09am    
Cool links, 5.
Kornfeld Eliyahu Peter 3-Aug-15 13:37pm    
Thank you...
Vinay1337 4-Aug-15 3:18am    
thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900