I have some javascript code that processes json output from asp.net web services built with framework 2.0. Now I need to support data returned from framework 3.5 web service
Here is a way around that
[WebMethod] [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)] public void Status() { MyObject myObject = new MyObject(); // your object here var json = Newtonsoft.Json.JsonConvert.SerializeObject(myObject); HttpContext.Current.Response.Write(json); }