2 instantiations of JsonResult
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Controller.cs (2)
291
return new
JsonResult
(data);
314
return new
JsonResult
(data, serializerSettings);
16 references to JsonResult
Microsoft.AspNetCore.Mvc.Core (9)
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
246
services.TryAddSingleton<IActionResultExecutor<
JsonResult
>, SystemTextJsonResultExecutor>();
Infrastructure\SystemTextJsonResultExecutor.cs (5)
16
internal sealed partial class SystemTextJsonResultExecutor : IActionResultExecutor<
JsonResult
>
34
public async Task ExecuteAsync(ActionContext context,
JsonResult
result)
109
private JsonSerializerOptions GetSerializerOptions(
JsonResult
result)
121
nameof(
JsonResult
),
122
nameof(
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"/>.
75
var executor = services.GetRequiredService<IActionResultExecutor<
JsonResult
>>();
Microsoft.AspNetCore.Mvc.Formatters.Json (1)
Properties\AssemblyInfo.cs (1)
7
[assembly: TypeForwardedTo(typeof(
JsonResult
))]
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"/>
289
public 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"/>
312
public virtual
JsonResult
Json(object? data, object? serializerSettings)