On Aug 28, 2012, at 8:41 AM, Stephan Steiner <[email protected]> wrote:
> But, swap out Key and Value in the dictionaries, and things go wrong on M4A:
> 
> "{\"CallUpdates\":[],\"Changes\":[{\"Changes\":[{\"Value\":true,\"Key\":\"deflectAllowed\"},{\"Value\":true,\"Key\":\"takeAllowed\"}],\"CallReference\":907,\"Line\":\"3453\"}],\"NewCalls\":[{\"Name\":\"WISSLER
> Patrick\",\"CustomActionParameter\":null,\"LookedUpName\":null,\"CallReference\":907,\"CustomActionNumber\":\"4771\",\"Correlator\":null,\"Number\":\"4771\",\"TelephonicState\":3,\"Capabilities\":null,\"Line\":\"3453\",\"E164Number\":\"4771\",\"CallState\":1}],\"EndedCalls\":[],\"Line\":\"3453\"}"
> 
> Data Contract definition can be seen here:
> https://bugzilla.xamarin.com/show_bug.cgi?id=6721

This is a bug in Mono's JSON deserializer in which it assumes that the key 
always comes before the value without any validation:

        
https://github.com/mono/mono/blob/master/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonSerializationReader.cs#L316

For the time being, I would suggest keeping the Key before the Value...

 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to