[Mono-dev] Replicating System.Web.Script.Serialization bugs
kostat at mainsoft.com
Mon Oct 1 13:47:52 EDT 2007
It's nice to get your 2 cents :-)
>1. Are there any other types that need special care, besides Nullable? How about generic types?
> As far as I remember, we don't have any tests with generics. Are we missing anything else?
Don't think, since this is a binary serialization.
>2. I was trying to think of a good strategy for implementing this, and havn't made up my mind yet.
> I agree with Kosta that the try, catch approach is not the best way. I think something a bit more fine grained
> should be used. What would happen if the value is "xxx" and the type is "int?"? This should probably
> throw the error and not silently assign the null value. (Requires a test with MS code...)
That's what I understood Tyler did and got null... Do I understand correctly?
From: Adar Wesley [mailto:adar.wesley at gmail.com]
Sent: Monday, October 01, 2007 7:18 PM
To: Konstantin Triger
Cc: R. Tyler Ballance; mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs
Hi Kosta and Tyler,
Having worked on this code with Kosta and following this thread a couple of questions come to my mind.
Just my two cents.
On 10/1/07, Konstantin Triger <kostat at mainsoft.com> wrote:
Try/catch does not seem the best way to do it, and unfortunately I don't have time now to look into the code.
Temporary you may yet do this workaround and compile your own version, so unblock yourself until the fix is available.
> -----Original Message-----
> From: R. Tyler Ballance [mailto: tyler at monkeypox.org]
> Sent: Monday, October 01, 2007 12:06 PM
> To: Konstantin Triger
> Cc: mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On Oct 1, 2007, at 1:42 AM, Konstantin Triger wrote:
> > Hey Tyler,
> > If you need this urgently, please provide a fix.
> > If not - it will be somewhere in my todo list and will be fixed in
> > a couple of weeks.
> Would you recommend just adding another if statement in:
> > internal object ConvertToType (Type type, object obj)
> Or is the bug elsewhere? The best I could tell as far as a fix would
> be would be to check if it's a Nullable type, and then try/catch a
> convert recursing into ConvertToType and in the catch setting
> hasValue = false, etc.
> If you can take the time to suggest a plan of action, I'd be more
> than happy to fix, test and commit a patch for this, since it's
> somewhat blocking me right now :)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
> -----END PGP SIGNATURE-----
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list