9 references to Serialize
Microsoft.Extensions.AI (3)
Embeddings\LoggingEmbeddingGenerator.cs (1)
83
private string AsJson<T>(T value) => JsonSerializer.
Serialize
(value, _jsonSerializerOptions.GetTypeInfo(typeof(T)));
Functions\AIFunctionFactory.cs (1)
392
string json = JsonSerializer.
Serialize
(value, options.SerializerOptions.GetTypeInfo(value.GetType()));
LoggingHelpers.cs (1)
23
return JsonSerializer.
Serialize
(value, typeInfo);
Microsoft.Extensions.AI.Abstractions (2)
Utilities\AIJsonUtilities.Schema.cs (2)
209
? JsonSerializer.
Serialize
(defaultValue, options.GetTypeInfo(defaultValue.GetType()))
342
JsonNode? defaultValue = JsonSerializer.
Serialize
(key.DefaultValue, options.GetTypeInfo(typeof(object)));
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (2)
432
result = JsonSerializer.
Serialize
(resultContent.Result, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(object)));
464
JsonSerializer.
Serialize
(callRequest.Arguments, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(IDictionary<string, object>))))));
Microsoft.Extensions.AI.OpenAI (2)
OpenAIModelMapper.ChatMessage.cs (1)
143
result = JsonSerializer.
Serialize
(resultContent.Result, options.GetTypeInfo(typeof(object)));
OpenAIRealtimeExtensions.cs (1)
127
var resultJson = JsonSerializer.
Serialize
(result, jsonOptions.GetTypeInfo(typeof(object)));