5 references to ObjectJsonContext
Microsoft.AspNetCore.Http.Results.Tests (5)
TypedResultsTests.cs (5)
866
var result = TypedResults.Json(data,
ObjectJsonContext
.Default.Object);
873
Assert.Equal(
ObjectJsonContext
.Default.Object, result.JsonTypeInfo);
883
var result = TypedResults.Json(data,
ObjectJsonContext
.Default);
905
var ex = Assert.Throws<InvalidOperationException>(() => TypedResults.Json(string.Empty, context:
ObjectJsonContext
.Default));
906
Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'System.String' from the context '{typeof(
ObjectJsonContext
).FullName}'.");