I have web services returning strings as JSON by dint of using
[WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
and calling them from the client with headers Content-type = application/json
this was all going well until I needed to return a table of results.
I have tried using the code here http://www.west-wind.com/Weblog/posts/471835.aspx which succesfully encodes my dataset as JSON and returns a string, but this is in turn then encoded with escapes as part of the return from the .net service which is not what is wanted at all. What type should my WebMethod return in order to get a datatable or dataset properly encoded as JSON ?