21

Closed

Add BSON support for Json.NET MediaTypeFormatter

description

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 7:41 PM by kirthik

comments

Rask wrote Jul 10, 2012 at 10: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 10:45 PM

mardsystems wrote Nov 1, 2012 at 3:51 PM

dougbu wrote Nov 5, 2013 at 5:08 AM

Checked in with commit 8b1440decc8c

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