I have this code :
class Sometype
{
public Number pos { get; set; }
}
class Number
{
private uint num;
private Number(uint num)
{
this.num = num;
}
public static implicit operator uint(Number sid)
{
return sid.num;
}
public static implicit operator Number(uint id)
{
return new Number(id);
}
}
And this json : {"pos":123}
When I try to deserialize this, I get a JsonException Error converting value 123 to type 'Tester2.Program+Number'.
. Please advise me.