So you're just serializing the object into a string as JSON? I will give that a shot and see what happens.
On Dec 5, 9:42 pm, oldwolf <oldwolfr...@gmail.com> wrote: > using Newtonsoft.Json; > .... > DefineClass yourClass = new DefineClass(); > /* process yourClass Data */ > string strJsonReturn = JsonConvert.SerializeObject(yourClass, > Formatting.Indented); > Response.ContentType = "application/x-javascript"; > Response.Write(strJsonReturn); > > it will return JSON > > Sorry because this code is C# but you can change to VB.NET easy. > > On Dec 3, 10:40 am, jtaylor <jtay...@lorencook.com> wrote: > > > > > > > > > I have a ASP.NET webservice written in VB using VS2010. I need it to > > return JSON but it insists on returning XML. I set > > "<ScriptMethod(ResponseFormat:=ResponseFormat.Json)>" on the function, > > but it still returns XML. > > > Any suggestions on where to start looking? -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to dotnetdevelopment@googlegroups.com To unsubscribe from this group, send email to dotnetdevelopment+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net