[Mono-osx] JSON from [WebMethod] differs between Mac and Linux
jmalcolm
malcolm.justin at gmail.com
Tue Feb 2 12:40:33 EST 2010
I built Mono 2.6.1 for Linux and it turns out that this is not a Linux vs.
OSX issue but rather a Mono 2.6.1 vs. Mono 2.4.3 issue. Sorry about that.
I did not believe this would be the case since this means newer Mono is less
compliant with newer versions of the real .NET than older Mono versions are.
I will post the a more general list and maybe post a bug if nobody can
explain why this change appeared.
jmalcolm wrote:
>
> I have an ASP.NET app that was developed primarily in C# on Mono on Linux.
> It uses JQuery on the client side. I have a few methods tagged with the
> [WebMethod] attribute in my .aspx pages which generate JSON in response to
> .ajax requests from JQuery.
>
> When I serve this application from Apache/mod_mono or XSP on Linux, the
> JSON that comes back is wrapped in a 'd' object that is added by the
> framework.
>
> If I serve this app from XSP on OSX, the JSON comes back without the 'd'
> wrapper. This breaks the client-side code.
>
> Is this an intentional difference between OSX and Linux? Can I configure
> this behavior somehow?
>
> My understanding is that Microsoft added the 'd' wrapper in .NET 3.5 to
> prevent certain kinds of cross site scripting attacks. I am not sure when
> it was added to Mono but I cannot remember it not being there on either
> Linux or Windows.
>
> I am using Mono 2.4.3.1 on Linux, Mono 2.4.3 on Windows, and Mono 2.6.1 on
> OSX.
>
> Here is a more concrete example of what I am saying:
>
> JSON from Linux:
>
> {"d":{"City":"Seattle","State":"WA"}}
>
> JSON from OSX:
>
> {"City":"Seattle","State":"WA"}
>
--
View this message in context: http://old.nabble.com/JSON-from--WebMethod--differs-between-Mac-and-Linux-tp27413475p27424406.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx
mailing list