There are two classes in
JsonResult is an
IActionResult which formats the given object as JSON
ObjectResult is an
IActionResult that has content negotiation built in.
ExecuteResultAsync, responsible for writing to the response stream, the framework will walk through the available formatters and select a relevant one.
The logic for choosing a formatter is similar to that in ASP.NET Web API, and based on the following order of precedence:
Microsoft.AspNetCore.Mvc.ObjectResultthat when executed performs content negotiation, formats the entity body, and will produce a
Microsoft.AspNetCore.Http.StatusCodes.Status200OKresponse if negotiation and formatting succeed.