3 instantiations of JsonContent
System.Net.Http.Json (3)
System\Net\Http\Json\JsonContent.cs (3)
71return new JsonContent(inputValue, JsonHelpers.GetJsonTypeInfo(inputType, options), mediaType); 86return new JsonContent(inputValue, jsonTypeInfo, mediaType); 101return new JsonContent(inputValue, jsonTypeInfo, mediaType);
49 references to JsonContent
Aspire.Hosting.Redis.Tests (2)
RedisFunctionalTests.cs (2)
569var jsonContent = JsonContent.Create(new
Microsoft.DotNet.Build.Tasks.Feed.Tests (10)
DownloadFileTests.cs (10)
36var jsonContent = JsonContent.Create( 104var jsonContent = JsonContent.Create( 173var jsonContent = JsonContent.Create( 309var jsonContent = JsonContent.Create( 383var jsonContent = JsonContent.Create(
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
128Content = JsonContent.Create(ToOllamaChatRequest(messages, options, stream: true), JsonContext.Default.OllamaChatRequest)
System.Net.Http.Json (36)
System\Net\Http\Json\HttpClientJsonExtensions.Patch.cs (8)
31JsonContent content = JsonContent.Create(value, mediaType: null, options); 52JsonContent content = JsonContent.Create(value, mediaType: null, options); 101JsonContent content = JsonContent.Create(value, jsonTypeInfo); 120JsonContent content = JsonContent.Create(value, jsonTypeInfo);
System\Net\Http\Json\HttpClientJsonExtensions.Post.cs (8)
20JsonContent content = JsonContent.Create(value, mediaType: null, options); 30JsonContent content = JsonContent.Create(value, mediaType: null, options); 48JsonContent content = JsonContent.Create(value, jsonTypeInfo); 56JsonContent content = JsonContent.Create(value, jsonTypeInfo);
System\Net\Http\Json\HttpClientJsonExtensions.Put.cs (8)
20JsonContent content = JsonContent.Create(value, mediaType: null, options); 30JsonContent content = JsonContent.Create(value, mediaType: null, options); 48JsonContent content = JsonContent.Create(value, jsonTypeInfo); 56JsonContent content = JsonContent.Create(value, jsonTypeInfo);
System\Net\Http\Json\JsonContent.cs (12)
44/// Creates a new instance of the <see cref="JsonContent"/> class that will contain the <paramref name="inputValue"/> serialized as JSON. 50/// <returns>A <see cref="JsonContent"/> instance.</returns> 53public static JsonContent Create<T>(T inputValue, MediaTypeHeaderValue? mediaType = null, JsonSerializerOptions? options = null) 57/// Creates a new instance of the <see cref="JsonContent"/> class that will contain the <paramref name="inputValue"/> serialized as JSON. 63/// <returns>A <see cref="JsonContent"/> instance.</returns> 66public static JsonContent Create(object? inputValue, Type inputType, MediaTypeHeaderValue? mediaType = null, JsonSerializerOptions? options = null) 75/// Creates a new instance of the <see cref="JsonContent"/> class that will contain the <paramref name="inputValue"/> serialized as JSON. 81/// <returns>A <see cref="JsonContent"/> instance.</returns> 82public static JsonContent Create<T>(T? inputValue, JsonTypeInfo<T> jsonTypeInfo, MediaTypeHeaderValue? mediaType = null) 90/// Creates a new instance of the <see cref="JsonContent"/> class that will contain the <paramref name="inputValue"/> serialized as JSON. 95/// <returns>A <see cref="JsonContent"/> instance.</returns> 96public static JsonContent Create(object? inputValue, JsonTypeInfo jsonTypeInfo, MediaTypeHeaderValue? mediaType = null)