Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Return Jason object from SQl query

Author  Topic 

nikoo56
Starting Member

26 Posts

Posted - 2015-01-12 : 12:25:41
Is it a way to return Jason object from SQL query?
This is my store proc that I like to return Jason object.



Create PROCEDURE [dbo].[Get_Payment_Gateway]

AS
BEGIN
SET NOCOUNT ON;

SELECT [Payment_Gateway_ID]
,[Payment_Gateway_Name]
,[Payment_Gateway_URL]
,[Payment_Gateway_Description]
FROM [CustomerPortal].[dbo].[Payment_Gateway] PG WITH (NOLOCK)


END





tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-01-12 : 12:39:29
What is "Jason object"? Please show us sample data and expected output.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-01-12 : 13:36:34
I think he means JSON. Think XML without the tags. So something like:

{"key":"value", {"nested key":"nested value"}, ...}, ...}

Here's an article on it:

http://www.codeproject.com/Articles/815371/Data-Parsing-SQL-to-JSON

Go to Top of Page
   

- Advertisement -