JamesNK / Newtonsoft.Json.Bson

Json.NET BSON adds support for reading and writing BSON to Json.NET
MIT License
55 stars 23 forks source link

Support for decimal #7

Open jmajoor opened 7 years ago

jmajoor commented 7 years ago

The BSON specification at (http://bsonspec.org/spec.html) has a datatype for decimal. The current implementation does not properly support this. The BsonWriter will write a decimal value as a BsonType.Number which is a double and therefore my decimal precision is lost.

I tried subclassing the BsonWriter, but it doesn't look like I can extend the classes to add this support. Are there plans to support the decimal datatype? Any other way I can use bson and work with decimals?