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