Open darkcrawler01 opened 10 years ago
i have exactly the same problem for long properties.
It serialize 0 value to "value" : 0
but on deserialization give this error
JsonException: Can't assign value '0' (type System.Int32) to type System.Int64
+1
+1 And if number is small same error occur.
I think that development on this library is dead. I've had a similar pull request sitting in the queue for awhile (to deal with cast exceptions between ints/longs). No movement.
You need to register an custom importer
JsonMapper.RegisterImporter<int, long>((int value) =>
{
return (long)value;
});
I am getting this issue when I using long field with a value 0 The code I am using :