I have class like this:
public class Pussy {
public readonly int Meows;
[JsonConstructor]
private Pussy() { }
public Pussy(int meows)
{
this.Meows = meows;
}
}
When I'm trying to serialize it with Json.NET, it working fine:
{"Meows":3}
But when deserialize, it's just creating class with Meows
set to 0
.
What's wrong? How to fix it?