Add BSON support for Json.NET MediaTypeFormatter


I'm so happy to see Json.NET being baked into Web API, however, I still have to write my own custom MediaTypeFormatter to support Bson. Json.NET supports this very easily using the same JsonSerializer.

Bson uses the same JsonSerializer / JsonSerializerSettings. BsonReader and BsonWriter inherit from JsonReader, JsonWriter respectively.

Please consider adding support for this. Thanks!

See discussion: http://aspnetwebstack.codeplex.com/discussions/359698
Closed Nov 18, 2013 at 6:41 PM by kirthik


Rask wrote Jul 10, 2012 at 9:13 PM

I'd like to see Web API support BSON as an alternative to JSON or XML for all request results.

mudnug wrote Jul 24, 2012 at 9:45 PM

mardsystems wrote Nov 1, 2012 at 2:51 PM

dougbu wrote Nov 5, 2013 at 4:08 AM

Checked in with commit 8b1440decc8c

Checkin directly supports BSON and allows easier extensibility for MessagePack and similar formatters.