-
Type:
Improvement
-
Resolution: Won't Do
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Serialization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Introduce a small static class to contain a few BSON related useful helper methods:
public static class Bson { public T Deserialize<T>(BsonDocument document); public T Deserialize<T>(BsonDocument document, IBsonSerializer<T> serializer); public T Deserialize<T>(byte[] bson); public T Deserialize<T>(byte[] bson, IBsonSerializer<T> serializer); public byte[] ToBson<T>(T value); public byte[] ToBson<T>(T value, IBsonSerializer<T> serializer); public byte[] ToBsonDocument<T>(T value); public byte[] ToBsonDocument<T>(T value, IBsonSerializer<T> serializer); // and probably more, but this gives the idea }
This would also be a step along the way to removing the ToBson and ToBsonDocument extension methods defined on object, which ended up polluting the global namespace.
- is related to
-
CSHARP-1118 Introduce a Json static class with a few JSON related helper methods
-
- Closed
-