Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-22 Thread Konstantin Triger
To: Konstantin Triger Cc: mono-devel-list@lists.ximian.com; Adar Wesley Subject: Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 15, 2007, at 2:14 AM, Konstantin Triger wrote: Hey Tyler, 1. Your code must come AFTER

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-20 Thread R. Tyler Ballance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 15, 2007, at 2:14 AM, Konstantin Triger wrote: Hey Tyler, 1. Your code must come AFTER 'if (type == null)' for obvious reasons. The best place would be just before 'return Convert.ChangeType (obj, type);' at the end of the function. 2.

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-15 Thread Konstantin Triger
. Tyler Ballance [mailto:[EMAIL PROTECTED] Sent: Sunday, October 14, 2007 7:13 AM To: Adar Wesley Cc: Konstantin Triger; mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs On Oct 1, 2007, at 10:17 AM, Adar Wesley wrote: Hi Kosta

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-15 Thread Vladimir Giszpenc
My apologies for being nosy, but if performance is what you preach, using as is even better... String s = obj as string; If (string.IsNullOrEmpty(s)) { return null; } 3. Please commit the code below for performance reasons. a. 'is' and casting are much cheaper. b. don't need to

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-13 Thread R. Tyler Ballance
On Oct 1, 2007, at 10:17 AM, Adar Wesley wrote: Hi Kosta and Tyler, Having worked on this code with Kosta and following this thread a couple of questions come to my mind. 1. Are there any other types that need special care, besides Nullable? How about generic types? As far as I

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-01 Thread Konstantin Triger
Ballance Sent: Thursday, September 27, 2007 11:26 AM To: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs On Sep 26, 2007, at 12:39 AM, Andrés G. Aragoneses [ knocte ] wrote: R. Tyler Ballance escribió: [...] Without providing

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-01 Thread R. Tyler Ballance
-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

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-01 Thread Konstantin Triger
. Tyler Ballance [mailto:[EMAIL PROTECTED] Sent: Monday, October 01, 2007 12:06 PM To: Konstantin Triger Cc: mono-devel-list@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

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-01 Thread Adar Wesley
01, 2007 12:06 PM To: Konstantin Triger Cc: mono-devel-list@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

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-01 Thread Konstantin Triger
Wesley [mailto:[EMAIL PROTECTED] Sent: Monday, October 01, 2007 7:18 PM To: Konstantin Triger Cc: R. Tyler Ballance; mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs Hi Kosta and Tyler, Having worked on this code with Kosta

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-10-01 Thread R. Tyler Ballance
On Oct 1, 2007, at 10:47 AM, Konstantin Triger wrote: 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.

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-09-27 Thread R. Tyler Ballance
On Sep 26, 2007, at 12:39 AM, Andrés G. Aragoneses [ knocte ] wrote: R. Tyler Ballance escribió: [...] Without providing compatibility for MS.NET, the only alternatives seem to be some application specific hacks, either with crazy properties as mentioned above, or using Nullable types (which

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-09-26 Thread Andrés G. Aragoneses [ knocte ]
R. Tyler Ballance escribió: [...] Without providing compatibility for MS.NET, the only alternatives seem to be some application specific hacks, either with crazy properties as mentioned above, or using Nullable types (which we don't yet support in Mono right?) Hey, I think Mono has

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-09-25 Thread Konstantin Triger
] On Behalf Of R. Tyler Ballance Sent: Sunday, September 23, 2007 3:58 PM To: mono-devel-list@lists.ximian.com Subject: [Mono-dev] Replicating System.Web.Script.Serialization bugs I discovered that whilst consuming Facebook's API data in JSON format, that both .NET 2.0 and Mono (from trunk) have

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-09-25 Thread Andreia Gaita
On 9/25/07, Konstantin Triger [EMAIL PROTECTED] wrote: 1. For value types: since there is no notion of 'null' value (unlike many dymanic languages) it would be very hard to differentiate between the 'default' and deserialized values if they are equal. (If you have a field of type 'Int32'

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-09-25 Thread Konstantin Triger
] [mailto:mono-devel-list- [EMAIL PROTECTED] On Behalf Of Andreia Gaita Sent: Tuesday, September 25, 2007 12:23 PM To: Konstantin Triger Cc: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs On 9/25/07, Konstantin Triger [EMAIL PROTECTED] wrote: 1

Re: [Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-09-25 Thread R. Tyler Ballance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sep 25, 2007, at 6:58 AM, Konstantin Triger wrote: One workaround would be to slightly massage the script prior to deserialization. A regexp should remedy things, maybe? This will kill performance, so can be a workaround implemented in app

[Mono-dev] Replicating System.Web.Script.Serialization bugs

2007-09-24 Thread R. Tyler Ballance
I discovered that whilst consuming Facebook's API data in JSON format, that both .NET 2.0 and Mono (from trunk) have the exact same System.Web.Script.Serialization bug when dealing with empty value fields in the JSON key/value string, for example: {some_key : } Which is handled properly