55 references to JsonResult
ApiExplorerWebSite (1)
ApiExplorerDataFilter.cs (1)
46
context.Result = new
JsonResult
(descriptions);
BasicWebSite (14)
Areas\Area1\Controllers\RemoteAttribute_VerifyController.cs (1)
17
return new
JsonResult
(value: false);
Areas\Area2\Controllers\RemoteAttribute_VerifyController.cs (1)
18
return new
JsonResult
(value: string.Format(
Controllers\ActionConstraints\ConsumesAttribute_OveridesController.cs (1)
16
return new
JsonResult
(product);
Controllers\ContentNegotiation\ContentNegotiationController.cs (1)
13
return new
JsonResult
("Index Method");
Controllers\ContentNegotiation\ProducesJsonController.cs (1)
13
return new
JsonResult
(new { MethodName = "Produces_WithNonObjectResult" });
Controllers\JsonResultWithNewtonsoftJsonController.cs (4)
23
return new
JsonResult
(new { Message = "hello" });
28
var result = new
JsonResult
(new { Message = "hello" });
40
return new
JsonResult
(null);
45
return new
JsonResult
("hello");
Controllers\JsonResultWithSystemTextJsonController.cs (4)
20
return new
JsonResult
(new { Message = "hello" });
25
var result = new
JsonResult
(new { Message = "hello" });
37
return new
JsonResult
(null);
42
return new
JsonResult
("hello");
Controllers\RemoteAttribute_VerifyController.cs (1)
39
return new
JsonResult
($"/RemoteAttribute_Verify/IsIdAvailable rejects {name}: '{value}'.");
Microsoft.AspNetCore.Mvc.Core.Test (19)
Infrastructure\JsonResultExecutorTestBase.cs (18)
30
var result = new
JsonResult
(new { foo = "abcd" });
50
var result = new
JsonResult
(new { foo = "abcd" });
72
var result = new
JsonResult
(new { foo = "abcd" })
95
var result = new
JsonResult
(new { foo = "abcd" });
115
var result = new
JsonResult
(new { foo = "abcd" });
141
var result = new
JsonResult
(new { foo = "abcd" });
166
var result = new
JsonResult
(new { foo = "abcd" });
209
var result = new
JsonResult
(new ModelWithSerializationError());
240
var result = new
JsonResult
("result_value");
258
var result = new
JsonResult
(null);
283
var result = new
JsonResult
(model);
316
var result = new
JsonResult
(value: null);
334
var result = new
JsonResult
(TestAsyncEnumerable());
352
var result = new
JsonResult
(TestAsyncPrimitiveEnumerable());
369
var result = new
JsonResult
(AsyncEnumerableClosedConnection());
400
var result = new
JsonResult
(AsyncEnumerableClosedConnection())
434
var result = new
JsonResult
(AsyncEnumerableThrows());
454
var result = new
JsonResult
(AsyncEnumerableThrows());
Infrastructure\SystemTextJsonResultExecutorTest.cs (1)
26
var result = new
JsonResult
(new ThrowingFormatterModel())
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (20)
JsonResultTest.cs (1)
28
var result = new
JsonResult
(value);
NewtonsoftJsonResultExecutorTest.cs (1)
40
var result = new
JsonResult
(TestAsyncEnumerable());
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (18)
30
var result = new
JsonResult
(new { foo = "abcd" });
50
var result = new
JsonResult
(new { foo = "abcd" });
72
var result = new
JsonResult
(new { foo = "abcd" })
95
var result = new
JsonResult
(new { foo = "abcd" });
115
var result = new
JsonResult
(new { foo = "abcd" });
141
var result = new
JsonResult
(new { foo = "abcd" });
166
var result = new
JsonResult
(new { foo = "abcd" });
209
var result = new
JsonResult
(new ModelWithSerializationError());
240
var result = new
JsonResult
("result_value");
258
var result = new
JsonResult
(null);
283
var result = new
JsonResult
(model);
316
var result = new
JsonResult
(value: null);
334
var result = new
JsonResult
(TestAsyncEnumerable());
352
var result = new
JsonResult
(TestAsyncPrimitiveEnumerable());
369
var result = new
JsonResult
(AsyncEnumerableClosedConnection());
400
var result = new
JsonResult
(AsyncEnumerableClosedConnection())
434
var result = new
JsonResult
(AsyncEnumerableThrows());
454
var result = new
JsonResult
(AsyncEnumerableThrows());
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Controller.cs (1)
291
return new
JsonResult
(data);