Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Closed Unassigned: Remove the JsonResult from ASP.NET Web API [1193]

$
0
0
Hi,

Today, I saw that ASP.NET Web API now has [JsonResult](https://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Web.Http/Results/JsonResult.cs) and even a Json method on ApiController. Just what we needed all along! I cannot think of any words which would describe my reaction when I saw it but maybe this picture can give a hint: [http://i.imgur.com/Bp9an.gif](http://i.imgur.com/Bp9an.gif)

Why on God's green earth do we have this? Why do we try to mess with HTTP and beautiful content negotiation that ASP.NET Web API framework has? This's harm! Please, just remove it and it will be nothing but a commit history.

Thanks!
Comments: While in most cases we expect web APIs to support content negotiation for multiple formats in some cases you just want to return some JSON. We added JsonResult as a simple way to return a JSON representation from an action that can also easily be unit tested.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>