Created
October 30, 2019 02:53
-
-
Save scottsauber/b4be83ef28af3ff960efbe2f84ad8a3f to your computer and use it in GitHub Desktop.
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 Startup | |
{ | |
private readonly IWebHostEnvironment _environment; | |
public Startup(IWebHostEnvironment environment) | |
{ | |
_environment = environment; | |
} | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddControllers() | |
.AddJsonOptions(options => options.JsonSerializerOptions.WriteIndented = _environment.IsDevelopment()); | |
} | |
// Other code ommitted for brevity | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment