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);
41 references to JsonContent
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
279var deleteContent = JsonContent.Create(new
Aspire.Hosting.Redis.Tests (2)
RedisFunctionalTests.cs (2)
683var jsonContent = JsonContent.Create(new
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
126Content = JsonContent.Create(ToOllamaChatRequest(chatMessages, options, stream: true), JsonContext.Default.OllamaChatRequest)
System.Net.Http.Json (36)
System\Net\Http\Json\HttpClientJsonExtensions.Patch.cs (8)
34JsonContent content = JsonContent.Create(value, mediaType: null, options); 58JsonContent content = JsonContent.Create(value, mediaType: null, options); 110JsonContent content = JsonContent.Create(value, jsonTypeInfo); 132JsonContent content = JsonContent.Create(value, jsonTypeInfo);
System\Net\Http\Json\HttpClientJsonExtensions.Post.cs (8)
23JsonContent content = JsonContent.Create(value, mediaType: null, options); 36JsonContent content = JsonContent.Create(value, mediaType: null, options); 57JsonContent content = JsonContent.Create(value, jsonTypeInfo); 68JsonContent content = JsonContent.Create(value, jsonTypeInfo);
System\Net\Http\Json\HttpClientJsonExtensions.Put.cs (8)
23JsonContent content = JsonContent.Create(value, mediaType: null, options); 36JsonContent content = JsonContent.Create(value, mediaType: null, options); 57JsonContent content = JsonContent.Create(value, jsonTypeInfo); 68JsonContent 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)