Created
August 22, 2012 18:48
-
-
Save DaveVdE/3428304 to your computer and use it in GitHub Desktop.
MyJsonMediaTypeFormatter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyJsonMediaTypeFormatter : JsonMediaTypeFormatter | |
{ | |
public override System.Threading.Tasks.Task WriteToStreamAsync(System.Type type, object value, System.IO.Stream writeStream, System.Net.Http.HttpContent content, System.Net.TransportContext transportContext) | |
{ | |
var obj = new {d = value}; | |
return base.WriteToStreamAsync(type, obj, writeStream, content, transportContext); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment