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