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

R. Tyler Ballance tyler at monkeypox.org
Tue Sep 25 16:14:48 EDT 2007


-----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 code only...

The other application-only hack that I thought could be implemented  
would be changing all of the properties that should be serialized in  
from JSON would be strings, and then either using a separate property  
that would be responsible for calling Convert.ToInt64 if the value is  
not an empty string, otherwise returning UINT_MAX or something that  
would indicate that there is not a "real" value for this Int64 property.

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?)


Proverbial rock and hard place :-P


Cheers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFG+Ww4A2GmJ0VpG78RAnd8AKCjJmW3emgmwGEniSMnUXxTTipwdACfTrQ2
hlU6YQOspOm9AvJaOHwUBKk=
=4gYJ
-----END PGP SIGNATURE-----



More information about the Mono-devel-list mailing list