title: How to make Owin self host support Json output?
body: <p>I am using Owin to build a self hosted server which support both file requests and web api. But the output for web api requests are always in xml format. How can I configure owin to output in json?</p>
  
  <p>The code is as below:</p>
  
  <pre><code>class Startup
  {
      public void Configuration(IAppBuilder app)
      {
          app.UseFileServer(new FileServerOptions()
          {
              RequestPath = PathString.Empty,
              FileSystem = new PhysicalFileSystem(@".\files")
          });
  
          // set the default page
          app.UseWelcomePage(@"/index.html");
  
          HttpConfiguration config = new HttpConfiguration();
  
          config.Routes.MapHttpRoute
          (
              name: "DefaultApi",
              routeTemplate: "api/{controller}/{id}",
              defaults: new { id = RouteParameter.Optional } 
          );
  
          app.UseWebApi(config);
      }
  }
  </code></pre>