3 instantiations of JsonContent
System.Net.Http.Json (3)
System\Net\Http\Json\JsonContent.cs (3)
71
return new
JsonContent
(inputValue, JsonHelpers.GetJsonTypeInfo(inputType, options), mediaType);
86
return new
JsonContent
(inputValue, jsonTypeInfo, mediaType);
101
return new
JsonContent
(inputValue, jsonTypeInfo, mediaType);
41 references to JsonContent
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
279
var
deleteContent =
JsonContent
.Create(new
Aspire.Hosting.Redis.Tests (2)
RedisFunctionalTests.cs (2)
683
var
jsonContent =
JsonContent
.Create(new
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
126
Content =
JsonContent
.Create(ToOllamaChatRequest(chatMessages, options, stream: true), JsonContext.Default.OllamaChatRequest)
System.Net.Http.Json (36)
System\Net\Http\Json\HttpClientJsonExtensions.Patch.cs (8)
34
JsonContent
content =
JsonContent
.Create(value, mediaType: null, options);
58
JsonContent
content =
JsonContent
.Create(value, mediaType: null, options);
110
JsonContent
content =
JsonContent
.Create(value, jsonTypeInfo);
132
JsonContent
content =
JsonContent
.Create(value, jsonTypeInfo);
System\Net\Http\Json\HttpClientJsonExtensions.Post.cs (8)
23
JsonContent
content =
JsonContent
.Create(value, mediaType: null, options);
36
JsonContent
content =
JsonContent
.Create(value, mediaType: null, options);
57
JsonContent
content =
JsonContent
.Create(value, jsonTypeInfo);
68
JsonContent
content =
JsonContent
.Create(value, jsonTypeInfo);
System\Net\Http\Json\HttpClientJsonExtensions.Put.cs (8)
23
JsonContent
content =
JsonContent
.Create(value, mediaType: null, options);
36
JsonContent
content =
JsonContent
.Create(value, mediaType: null, options);
57
JsonContent
content =
JsonContent
.Create(value, jsonTypeInfo);
68
JsonContent
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>
53
public 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>
66
public 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>
82
public 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>
96
public static
JsonContent
Create(object? inputValue, JsonTypeInfo jsonTypeInfo, MediaTypeHeaderValue? mediaType = null)