This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Add a Controller.Json(object, JsonSerializerSettings) overload #2506
Closed
Description
Right now JSON settings can only be defined once at an application level on the JsonOutputFormatter. It would be useful to be able to pass a JsonSerializerSettings argument to the Controller.Json method to override the JSON settings on a per result basis, e.g. a developer might want indented JSON, or to use a specific JsonConverter, for only one action in their application.
Current method:
Mvc/src/Microsoft.AspNet.Mvc.Core/Controller.cs
Lines 383 to 400 in 7e62325