i have this piece of code:
//JSON is in Jil library
var a = JSON.Deserialize(@"{""PhoneNumber"": ""09214523155"",""Password"": ""1928160"",""Token"": ""string"",""SubSystem"": ""string"",""Version"": 0,""DeviceType"": 0} ", typeof(LoginContactInput), Options.ISO8601);
and it is my LoginContactInput
class and DeviceType
enum:
public class LoginContactInput
{
public string PhoneNumber { get; set; }
public string Password { get; set; }
public string Token { get; set; }
public string SubSystem { get; set; }
public int Version { get; set; }
public DeviceType DeviceType { get; set; } //DeviceType is an Enum
}
public enum DeviceType
{
Mobile,
Server
}
but this throw an exception that says : Expected character: '"'
i think my json is correct
what is wrong?