[Mono-dev] ASP.Net Ajax Json serialization problem

Alexandre Miguel Pedro Gomes alexmipego at gmail.com
Mon Dec 28 15:41:41 EST 2009


I've been developing on VS.Net and deploying into a Linux box with Mono
2.4.x without a problem. Yesterday I've updated my mono install to 2.6.1 in
order to find out if another bug was fixed, but to my surprise even more
stuff stopped working correctly. Using firebug I found the root of the
problem, usually ASP.Net ajax JSON responses are wrapped inside a "d" array
and should look like this:

{"d":{"d":"Hello World"}}

However, Mono 2.6.1 output is simply:

{"d":"Hello World"}

For testing I created a very simple page method:

public static object HelloWorld()
   return new { d = "Hello World" };

Which I call using firebug:

PageMethods.HelloWorld(function() {alert('success');}, function()

If I change the method's string to simpy "Hello" world then the javascript
will totally fail and won't give either a success or failure callback.

Anyone knows the problem?

Happy new year everyone!
Alexandre Gomes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091228/951ee3d9/attachment.html 

More information about the Mono-devel-list mailing list