[Mono-dev] Replicating System.Web.Script.Serialization bugs
Konstantin Triger
kostat at mainsoft.com
Mon Oct 1 13:47:52 EDT 2007
Hey Adar,
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?
Regards,
Konstantin Triger
________________________________
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.
---
Adar Wesley
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.
Regards,
Konstantin Triger
> -----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 :)
>
>
> Cheers
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
>
> iD8DBQFHAMahA2GmJ0VpG78RAj6DAJwNBqkPL85OBjufkZafa4v6/lW60wCgoiJT
> DUyhiLCjc+xXrwQ6i8ouMcY=
> =rs5n
> -----END PGP SIGNATURE-----
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
--
---
Adar Wesley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071001/b3b492bc/attachment.html
More information about the Mono-devel-list
mailing list