2 instantiations of JsonResult
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Controller.cs (2)
291return new JsonResult(data); 314return new JsonResult(data, serializerSettings);
27 references to JsonResult
Microsoft.AspNetCore.Mvc.Core (9)
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
246services.TryAddSingleton<IActionResultExecutor<JsonResult>, SystemTextJsonResultExecutor>();
Infrastructure\SystemTextJsonResultExecutor.cs (5)
16internal sealed partial class SystemTextJsonResultExecutor : IActionResultExecutor<JsonResult> 34public async Task ExecuteAsync(ActionContext context, JsonResult result) 109private JsonSerializerOptions GetSerializerOptions(JsonResult result) 121nameof(JsonResult), 122nameof(JsonResult.SerializerSettings),
JsonResult.cs (3)
16/// Creates a new <see cref="JsonResult"/> with the given <paramref name="value"/>. 25/// Creates a new <see cref="JsonResult"/> with the given <paramref name="value"/>. 75var executor = services.GetRequiredService<IActionResultExecutor<JsonResult>>();
Microsoft.AspNetCore.Mvc.Formatters.Json (1)
Properties\AssemblyInfo.cs (1)
7[assembly: TypeForwardedTo(typeof(JsonResult))]
Microsoft.AspNetCore.Mvc.NewtonsoftJson (11)
DependencyInjection\NewtonsoftJsonMvcCoreBuilderExtensions.cs (3)
65f.ServiceType == typeof(IActionResultExecutor<JsonResult>) && 66f.ImplementationType?.Assembly == typeof(JsonResult).Assembly); 72services.TryAddSingleton<IActionResultExecutor<JsonResult>, NewtonsoftJsonResultExecutor>();
NewtonsoftJsonResultExecutor.cs (8)
18/// Executes a <see cref="JsonResult"/> to write to the response. 20internal sealed partial class NewtonsoftJsonResultExecutor : IActionResultExecutor<JsonResult> 63/// Executes the <see cref="JsonResult"/> and writes the response. 66/// <param name="result">The <see cref="JsonResult"/>.</param> 68public async Task ExecuteAsync(ActionContext context, JsonResult result) 145private JsonSerializerSettings GetSerializerSettings(JsonResult result) 157nameof(JsonResult), 158nameof(JsonResult.SerializerSettings),
Microsoft.AspNetCore.Mvc.ViewFeatures (6)
Controller.cs (6)
282/// Creates a <see cref="JsonResult"/> object that serializes the specified <paramref name="data"/> object 286/// <returns>The created <see cref="JsonResult"/> that serializes the specified <paramref name="data"/> 289public virtual JsonResult Json(object? data) 295/// Creates a <see cref="JsonResult"/> object that serializes the specified <paramref name="data"/> object 307/// <returns>The created <see cref="JsonResult"/> that serializes the specified <paramref name="data"/> 312public virtual JsonResult Json(object? data, object? serializerSettings)