Handle DBNull.Value and simple runtime types in BSON formatter (fixes #1440 & #1457)
- http://aspnetwebstack.codeplex.com/workitem/1440
- "Roundtripping DBNull value using Bsonformatter thrown an error"
- https://aspnetwebstack.codeplex.com/workitem/1457
- "Bsonformatter throws an error when passing simple types as ObjectContent"
- Switch checks for serialization as Dictionary<string, object> to use runtime type
- Special-case DBNull.Value on write (serialize empty content) in
BsonMediaTypeFormatter.WriteToStream()
- Special-case DBNull type and empty content on read (return DBNull.Value) in new
BsonMediaTypeFormatter.ReadFromStreamAsync() override
- Add unit tests for round-trips with minimal type information and with DBNull values
- Use new unit test helper for round-trip tests
↧