JSON
Web Service to JSON mapping
Slim CD supports JSON in two ways:
- SLIM CD’s JavaScript library (slimcd.js) that follows the same naming convention as our other libraries, but calls our JSON services instead of directly calling the web services.
- SLIM CD’s JSON services – jsonscript.asp and jsonpayment.asp. These JSON services wrap the SLIM CD web services and web resources. The SLIM CD JavaScript library calls the SLIM CD JSON functions.
- For processing transactions, use the jsonpayment.asp resource. It will return the full payment structure, even on errors.
- For all other web service calls, use the jsonscript.asp resource. Each web service or resource has a unique name. That name is passed to the jsonscript.asp page as a parameter (service=), identifying the final web service to call.
Below is an example of retrieving JSON format instead of XML for the GetDailySummary report:
1 2 3 |
Web Service: <a href="https://stats.slimcd.com/wswebservices/reports.asmx/GetDailySummary">https://stats.slimcd.com/wswebservices/reports.asmx/GetDailySummary</a> |
1 2 3 |
JSON Service: <a href="https://stats.slimcd.com/soft/json/jsonscript.asp?service=GetDailySummary">https://stats.slimcd.com/soft/json/jsonscript.asp?service=GetDailySummary</a> |
1 2 3 |
Library: SlimCD.Reports.GetDailySummary |