Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
New Member
Posts: 21
Registered: ‎03-27-2009

Is it possible to return JSON using sData?

I have been working with sData for a while now in XML format, but would prefer to get JSON data back instead.  According to the sData spec this is possible by passing a format=json.  Does this work for SalesLogix?  Does anyone have experience with this?

Highlighted
New Member
Posts: 26
Registered: ‎02-21-2011

Re: Is it possible to return JSON using sData?

Hi,

I also need to return JSON using sData, how can accomplish that ?

Thanks,

Marcelo.

Highlighted
Bronze Super Contributor
Posts: 204
Registered: ‎03-10-2009

Re: Is it possible to return JSON using sData?

What version of SLX are you working with? SP3 does return JSON. In fact this is the default format for the return.


Sr. Sales Engineer
Gene Arnold
Highlighted
New Member
Posts: 26
Registered: ‎02-21-2011

Re: Is it possible to return JSON using sData?

[ Edited ]

Hi Gene,

 

I need to consume data from Slx 7.5.3 using SDATA, but I would like to get the objects based on Json format, the data is retrieved in feed format.

is there anything i need to set so that sdata returns a json object?

 

Thanks,

Marcelo.

 

Highlighted
New Member
Posts: 21
Registered: ‎03-27-2009

Re: Is it possible to return JSON using sData?

You need to sent a format=json at the end of the URL or add a header for Json.

Highlighted
Silver Contributor
Posts: 835
Registered: ‎03-24-2009

Re: Is it possible to return JSON using sData?

 

Could you please post an example?

 

Thanks!

RJ Samp
Highlighted
New Member
Posts: 21
Registered: ‎03-27-2009

Re: Is it possible to return JSON using sData?

Highlighted
New Member
Posts: 26
Registered: ‎02-21-2011

Re: Is it possible to return JSON using sData?

Hi

I am using JScript to consume SData services? How can I enable Json ? within the create service constructor ?

Thanks,

Marcelo.

 

Highlighted
New Member
Posts: 21
Registered: ‎03-27-2009

Re: Is it possible to return JSON using sData?

 I'm not sure what library you are using. Can you provide your code?

Highlighted
New Member
Posts: 26
Registered: ‎02-21-2011

Re: Is it possible to return JSON using sData?

Below is the code I am using to create the service, I am using sdata-client-dependencies.js and  sdata-client.js

 

 

function CreateService() {

           

var service = new Sage.SData.Client.SDataService({

serverName:'myserver',

port:'myport',

virtualDirectory:'sdata',

applicationName:'slx',

contractName:'dynamic',

userName:'lee',

password:''

 

                                                                                                         });

           

return service;

                                                          }