Handling json pretty print param in ASP.NET Web API application in HttpConfiguration instance
问题 I need to add and handle optional "pretty" parameter in my ASP.NET Web API application. When user sends "pretty=true", the application response should look like a human-readable json with indentations. When user sends "pretty=false" or does not send this parameter at all, he must get json with no space symbols in response. Here's what I have: Global.asax.cs public class WebApiApplication : HttpApplication { protected void Application_Start() { AreaRegistration.RegisterAllAreas();