55 references to ToJsonString
aspire (1)
Projects\FallbackProjectParser.cs (1)
159return JsonDocument.Parse(rootObject.ToJsonString());
Aspire.Cli.Tests (19)
Projects\ProjectUpdaterTests.cs (19)
93var json = itemsAndProperties.ToJsonString(); 204var json = itemsAndProperties.ToJsonString(); 349var json = itemsAndProperties.ToJsonString(); 508var json = itemsAndProperties.ToJsonString(); 652var json = itemsAndProperties.ToJsonString(); 757var json = itemsAndProperties.ToJsonString(); 859var json = itemsAndProperties.ToJsonString(); 1003var json = itemsAndProperties.ToJsonString(); 1126var json = itemsAndProperties.ToJsonString(); 1240var json = itemsAndProperties.ToJsonString(); 1350var json = itemsAndProperties.ToJsonString(); 1716var json = itemsAndProperties.ToJsonString(); 1790var json = itemsAndProperties.ToJsonString(); 1873var json = itemsAndProperties.ToJsonString(); 1956var json = itemsAndProperties.ToJsonString(); 2043var json = itemsAndProperties.ToJsonString(); 2122var json = itemsAndProperties.ToJsonString(); 2208var json = itemsAndProperties.ToJsonString(); 2337var json = itemsAndProperties.ToJsonString();
Aspire.Dashboard (5)
Model\GenAI\GenAIItemPartViewModel.cs (3)
71_ => toolCallRequestPart.Arguments.ToJsonString() 78return new TextVisualizerViewModel(toolCallResponsePart.Response?.ToJsonString() ?? string.Empty, indentText: true); 82var content = additionalProperties.Count > 0 ? ToJsonObject(additionalProperties).ToJsonString() : string.Empty;
Otlp\Model\OtlpHelpers.cs (2)
114AnyValue.ValueOneofCase.ArrayValue => ConvertAnyValue(value)!.ToJsonString(s_jsonSerializerOptions), 115AnyValue.ValueOneofCase.KvlistValue => ConvertAnyValue(value)!.ToJsonString(s_jsonSerializerOptions),
Aspire.Dashboard.Tests (2)
Model\GenAIVisualizerDialogViewModelTests.cs (2)
410Assert.Equal(@"{""count"":2}", toolCallRequestPart.Arguments!.ToJsonString()); 418p => Assert.Equal(@"[""Jack"",""Jane""]", Assert.IsType<ToolCallResponsePart>(p.MessagePart).Response!.ToJsonString()));
Aspire.Hosting (4)
Dashboard\DashboardEventHandlers.cs (1)
272File.WriteAllText(tempPath, configJson.ToJsonString(new JsonSerializerOptions { WriteIndented = true }));
Pipelines\Internal\FileDeploymentStateManager.cs (1)
70flattenedSecrets.ToJsonString(s_jsonSerializerOptions),
UserSecrets\UserSecretsManagerFactory.cs (2)
142var json = flattenedState.ToJsonString(s_jsonSerializerOptions); 179var json = contents.ToJsonString(s_jsonSerializerOptions);
Aspire.Hosting.Azure (5)
Provisioning\BicepUtilities.cs (2)
89var input = parameters.ToJsonString() + resource.GetBicepTemplateString(); 92input += scope.ToJsonString();
Provisioning\Provisioners\BicepProvisioner.cs (3)
243stateSection.Data["Parameters"] = parameters.ToJsonString(); 248stateSection.Data["Outputs"] = outputObj.ToJsonString(); 254stateSection.Data["Scope"] = scope.ToJsonString();
Aspire.Hosting.Azure.Tests (3)
AzureDeployerTests.cs (1)
1213await File.WriteAllTextAsync(deploymentStatePath, cachedState.ToJsonString());
BicepUtilitiesTests.cs (2)
419["Parameters"] = parameters.ToJsonString() 454["Parameters"] = parameters.ToJsonString()
ConfigurationSchemaGenerator.Tests (2)
GeneratorTests.cs (2)
1582var expectedText = expectedJson.ToJsonString(s_testSerializerOptions); 1583var actualText = actualJson.ToJsonString(s_testSerializerOptions);
Microsoft.AspNetCore.Identity.Test (1)
Passkeys\PasskeyScenarioTest.cs (1)
118return jsonObject.ToJsonString(_jsonSerializerOptions);
Microsoft.Extensions.AI.Evaluation.Quality (3)
AIToolExtensions.cs (1)
41string renderedToolDefinitions = toolDefinitionsJsonArray.ToJsonString(options);
ChatMessageExtensions.cs (1)
32string renderedMessages = messagesJsonArray.ToJsonString(options);
ChatResponseExtensions.cs (1)
48string renderedToolCallsAndResults = toolCallsAndResultsJsonArray.ToJsonString(options);
Microsoft.Extensions.AI.Evaluation.Safety (5)
ContentSafetyServicePayloadUtilities.cs (4)
160return (payload.ToJsonString(), diagnostics); 220IEnumerable<string> userTextListStrings = userTextListItems.Select(item => item.ToJsonString()); 242return (payload.ToJsonString(), diagnostics); 380return (payload.ToJsonString(), diagnostics);
EvaluationMetricExtensions.cs (1)
99string serializedData = data.ToJsonString(new JsonSerializerOptions { WriteIndented = true });
System.Text.Json (5)
System\Text\Json\Nodes\JsonArray.cs (2)
353public string Json => _node.ToJsonString(); 390return Value.ToJsonString();
System\Text\Json\Nodes\JsonObject.cs (2)
326public string Json => _node.ToJsonString(); 369return $"{PropertyName} = {Value.ToJsonString()}";
System\Text\Json\Nodes\JsonValueOfT.cs (1)
139public string Json => _node.ToJsonString();