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