Quantcast
Channel: SCN : Popular Discussions - SAP SQL Anywhere
Viewing all articles
Browse latest Browse all 1302

Web service with JSON result

$
0
0

When I create a web service that returns JSON and I use the example from the help file:

 

SELECT top 3

   emp.EmployeeID,

   so.CustomerID,

   so.Region

FROM Employees AS emp KEY JOIN SalesOrders AS so WHERE emp.EmployeeID <= 195

ORDER BY 1

FOR JSON AUTO;

 

The webservice returns:

 

"forjson(512,'emp',forxml_sep(),'EmployeeID',jsontab."1",'so',forxml_sep(),'CustomerID',jsontab."2",'Region',jsontab."3")": "[{"emp":{"EmployeeID":129,"so":[{"CustomerID":107,"Region":"Eastern"},{"CustomerID":119,"Region":"Western"},{"CustomerID":131,"Region":"Eastern"}]}}]"

 

How can I get rid of the header "forjson...." and how can I get rid of the " around the data section?

 

TIA

 

Frank


Viewing all articles
Browse latest Browse all 1302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>