I am using version 2.0.0.6 (latest on NuGet) in a Xamarin.Android project targeting API Level 15. The following Json string fails to deserialize:
{"NewDataAvailable":false,"ServiceAction":null}
This is the corresponding class:
[DataContract]
public class DeviceNotification
{
[DataMember]
public bool NewDataAvailable { get; set; }
[DataMember]
public DeviceServiceAction? ServiceAction { get; set; }
}
DeviceServiceAction is an enum.
When trying to deserialize, I receive the following error:
System.Exception: Bad number (int) at 42 (found: '\110')
The problem only occurs when ServiceAction is null.
I am using version 2.0.0.6 (latest on NuGet) in a Xamarin.Android project targeting API Level 15. The following Json string fails to deserialize:
{"NewDataAvailable":false,"ServiceAction":null}This is the corresponding class:
DeviceServiceAction is an enum.
When trying to deserialize, I receive the following error:
System.Exception: Bad number (int) at 42 (found: '\110')
The problem only occurs when ServiceAction is null.