Closed gelambert closed 5 years ago
Thank you for your feedback. We do not plan to add additional extensibility to JsonResult
.
Creating your own ActionResult
is exactly what we recommend. (Not sure if deriving from JsonResult
helps but that's up to you.) We're closing this issue as the behaviour discussed is by design.
It would be nice to give possibility to inject a custom json serializer in
JsonResult
.I find the current one (
JavaScriptSerializer
) sometimes limited (for example when i want to camel case the properties of my object).It would result in something like below :
Could this feature be considered ? Currently, I am using a class which inherits from JsonResult to achieve what I want.