-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Feature Request
-
None
Version: commit b552f5e394d2fca892d5
Exception: System.IO.FileFormatException : Cannot deserialize Decimal from BsonType: Double
This is more for interoperability with other JSON serializers which may serialize decimals without quotations.
--------
public class Doc
{
public decimal Value
}
[Test]
public void SerializeJsonNumberAsDecimal()
{
var d = BsonSerializer.Deserialize<Doc>("
");
Assert.AreEqual(d.Value, 1.23m);
}