410 instantiations of JsonObject
aspire (32)
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (2)
221config["mcpServers"] = new JsonObject(); 227servers[AspireServerName] = new JsonObject
Agents\CopilotCli\CopilotCliAgentEnvironmentScanner.cs (3)
217config["mcpServers"] = new JsonObject(); 223servers[AspireServerName] = new JsonObject 228["env"] = new JsonObject
Agents\McpConfigFileHelper.cs (2)
72return new JsonObject(); 84return JsonNode.Parse(content)?.AsObject() ?? new JsonObject();
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (2)
211config["mcp"] = new JsonObject(); 217mcp[AspireServerName] = new JsonObject
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (2)
261config["servers"] = new JsonObject(); 267servers[AspireServerName] = new JsonObject
Commands\SecretListCommand.cs (1)
60var obj = new JsonObject();
Configuration\ConfigurationService.cs (4)
25? new JsonObject() 26: JsonNode.Parse(existingContent)?.AsObject() ?? new JsonObject(); 30settings = new JsonObject(); 199currentObject[part] = new JsonObject();
Projects\FallbackProjectParser.cs (5)
121var rootObject = new JsonObject(); 124var itemsObject = new JsonObject(); 130var packageObj = new JsonObject(); 141var projectObj = new JsonObject(); 151var propertiesObject = new JsonObject();
src\Shared\ConsoleLogs\SharedAIHelpers.cs (7)
218var attributesObj = new JsonObject(); 231var linkObjects = span.Links.Select(link => (JsonNode)new JsonObject 249var spanObj = new JsonObject 274var traceData = new JsonObject 584var attributesObject = new JsonObject(); 592var log = new JsonObject 615return new JsonObject
src\Shared\Json\JsonFlattener.cs (3)
18var result = new JsonObject(); 28var result = new JsonObject(); 40var newObject = new JsonObject();
src\Shared\UserSecrets\SecretsStore.cs (1)
87var obj = new JsonObject();
Aspire.Cli.Tests (52)
Agents\CopilotCliAgentEnvironmentScannerTests.cs (6)
100var existingConfig = new JsonObject 102["mcpServers"] = new JsonObject 104["other-server"] = new JsonObject 140var existingConfig = new JsonObject 142["mcpServers"] = new JsonObject 144["aspire"] = new JsonObject
Agents\NpmProvenanceCheckerTests.cs (15)
85var statement = new JsonObject 89["predicate"] = new JsonObject 91["buildDefinition"] = new JsonObject 93["externalParameters"] = new JsonObject() 216var statement = new JsonObject 220["predicate"] = new JsonObject 222["buildDefinition"] = new JsonObject 225["externalParameters"] = new JsonObject 227["workflow"] = new JsonObject 235["runDetails"] = new JsonObject 237["builder"] = new JsonObject 247var attestationResponse = new JsonObject 251new JsonObject 254["bundle"] = new JsonObject 256["dsseEnvelope"] = new JsonObject
Agents\VsCodeAgentEnvironmentScannerTests.cs (6)
177var existingConfig = new JsonObject 179["servers"] = new JsonObject 181["other-server"] = new JsonObject 218var existingConfig = new JsonObject 220["servers"] = new JsonObject 222["other-server"] = new JsonObject
Projects\ProjectUpdaterTests.cs (25)
71var itemsAndProperties = new JsonObject(); 182var itemsAndProperties = new JsonObject(); 320var itemsAndProperties = new JsonObject(); 463var itemsAndProperties = new JsonObject(); 624var itemsAndProperties = new JsonObject(); 742var itemsAndProperties = new JsonObject(); 844var itemsAndProperties = new JsonObject(); 977var itemsAndProperties = new JsonObject(); 1094var itemsAndProperties = new JsonObject(); 1214var itemsAndProperties = new JsonObject(); 1327var itemsAndProperties = new JsonObject(); 1694var itemsAndProperties = new JsonObject(); 1776var itemsAndProperties = new JsonObject(); 1859var itemsAndProperties = new JsonObject(); 1940var itemsAndProperties = new JsonObject(); 2029var itemsAndProperties = new JsonObject(); 2108var itemsAndProperties = new JsonObject(); 2188var itemsAndProperties = new JsonObject(); 2315var itemsAndProperties = new JsonObject(); 2615JsonObject properties = new JsonObject(); 2627JsonObject items = new JsonObject(); 2655JsonObject newPackageReference = new JsonObject 2671JsonObject newPackageReference = new JsonObject 2687JsonObject newProjectReference = new JsonObject 2698JsonObject properties = new JsonObject();
Aspire.Dashboard (15)
Model\Assistant\AIHelpers.cs (6)
65var urlObj = new JsonObject 80healthReportsArray.Add(new JsonObject 88var healthObj = new JsonObject 97commandsArray.Add(new JsonObject 104var resourceObj = new JsonObject 150relationships.Add(new JsonObject
Model\GenAI\GenAIItemPartViewModel.cs (1)
96var jsonObject = new JsonObject();
Otlp\Model\OtlpHelpers.cs (1)
146var o = new JsonObject();
src\Shared\ConsoleLogs\SharedAIHelpers.cs (7)
218var attributesObj = new JsonObject(); 231var linkObjects = span.Links.Select(link => (JsonNode)new JsonObject 249var spanObj = new JsonObject 274var traceData = new JsonObject 584var attributesObject = new JsonObject(); 592var log = new JsonObject 615return new JsonObject
Aspire.Dashboard.Tests (9)
Integration\OtlpGrpcServiceTests.cs (6)
164var configJson = new JsonObject 166["Dashboard"] = new JsonObject 168["Otlp"] = new JsonObject 206configJson = new JsonObject 208["Dashboard"] = new JsonObject 210["Otlp"] = new JsonObject
Integration\StartupTests.cs (3)
634var configJson = new JsonObject 636["Logging"] = new JsonObject 638["LogLevel"] = new JsonObject
Aspire.Hosting (7)
Ats\AtsError.cs (2)
45var obj = new JsonObject 96var obj = new JsonObject();
Pipelines\Internal\DeploymentStateManagerBase.cs (1)
295nextObj = new JsonObject();
Pipelines\Internal\JsonFlattener.cs (3)
21var result = new JsonObject(); 34var result = new JsonObject(); 46var newObject = new JsonObject();
UserSecrets\UserSecretsManagerFactory.cs (1)
180var contents = new JsonObject();
Aspire.Hosting.Azure (4)
Provisioning\BicepUtilities.cs (1)
45parameters[parameter.Key] = new JsonObject()
Provisioning\JsonExtensions.cs (1)
22node = new JsonObject();
Provisioning\Provisioners\BicepProvisioner.cs (2)
163var parameters = new JsonObject(); 166var scope = new JsonObject();
Aspire.Hosting.Azure.Tests (48)
AzureBicepResourceTests.cs (1)
185.WithParameter("param3", new JsonObject() { ["value"] = "nested" })
AzureDeployerTests.cs (1)
1430var cachedState = new JsonObject
AzureEventHubsExtensionsTests.cs (1)
398document["UserConfig"]!["LoggingConfig"] = new JsonObject { ["Type"] = "Console" };
AzureServiceBusExtensionsTests.cs (1)
510document["UserConfig"]!["Logging"] = new JsonObject { ["Type"] = "Console" };
BicepUtilitiesTests.cs (40)
22var parameters = new JsonObject(); 53.WithParameter("jsonObj", new JsonObject { ["key"] = "value" }) 58var parameters = new JsonObject(); 101.WithParameter("jsonObj", new JsonObject { ["key"] = "value" }); 107.WithParameter("jsonObj", new JsonObject { ["key"] = "value" }); 109var parameters0 = new JsonObject(); 113var parameters1 = new JsonObject(); 134.WithParameter("jsonObj", new JsonObject { ["key"] = "value" }); 136var parameters0 = new JsonObject(); 140var parameters1 = new JsonObject(); 160var parameters0 = new JsonObject(); 161var scope0 = new JsonObject(); 166var parameters1 = new JsonObject(); 167var scope1 = new JsonObject(); 188var parameters0 = new JsonObject(); 189var scope0 = new JsonObject(); 194var parameters1 = new JsonObject(); 195var scope1 = new JsonObject(); 211var parameters = new JsonObject 213["param1"] = new JsonObject { ["value"] = "value1" } 231var parameters1 = new JsonObject 233["param1"] = new JsonObject { ["value"] = "value1" } 236var parameters2 = new JsonObject 238["param1"] = new JsonObject { ["value"] = "value2" } 256var parameters = new JsonObject 258["param1"] = new JsonObject { ["value"] = "value1" } 261var scope1 = new JsonObject { ["resourceGroup"] = "rg1" }; 262var scope2 = new JsonObject { ["resourceGroup"] = "rg2" }; 284var parameters1 = new JsonObject 286["param1"] = new JsonObject { ["value"] = value1 } 289var parameters2 = new JsonObject 291["param1"] = new JsonObject { ["value"] = value2 } 319var parameters = new JsonObject(); 339var scope = new JsonObject(); 357var scope = new JsonObject(); 411var parameters = new JsonObject 413["param1"] = new JsonObject { ["value"] = "value1" } 445var parameters = new JsonObject 447[AzureBicepResource.KnownParameters.PrincipalType] = new JsonObject { ["value"] = "User" }, 448[AzureBicepResource.KnownParameters.PrincipalId] = new JsonObject { ["value"] = "1234" },
JsonExtensionsTests.cs (3)
14var rootJson = new JsonObject(); 30var rootJson = new JsonObject(); 44var rootJson = new JsonObject();
ProvisioningTestHelpers.cs (1)
618: new JsonObject();
Aspire.Hosting.RemoteHost.Tests (108)
AtsMarshallerTests.cs (8)
225var json = new JsonObject { ["$handle"] = handleId }; 237var json = new JsonObject { ["$handle"] = "aspire/Unknown:999" }; 273var json = new JsonObject { ["key1"] = 1, ["key2"] = 2 }; 515var json = new JsonObject { ["a"] = 1, ["b"] = 2 }; 528var json = new JsonObject { ["value"] = 42 }; 541var json = new JsonObject { ["name"] = "test", ["count"] = 5 }; 593var json = new JsonObject { ["label"] = "item", ["status"] = "ValueA" }; 607var json = new JsonObject { ["label"] = "test", ["status"] = "valueb" };
CapabilityDispatcherTests.cs (76)
72dispatcher.Invoke("test/capability@1", new JsonObject { ["name"] = "test-value" }); 167var args = new JsonObject { ["value"] = "hello" }; 179var args = new JsonObject { ["required"] = "test" }; 191var args = new JsonObject { ["required"] = "test", ["optional"] = "custom" }; 232var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = handleId } }; 259var args = new JsonObject { ["context"] = "not-a-handle" }; 271var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = "Aspire.Hosting.RemoteHost.Tests/Aspire.Hosting.RemoteHost.Tests.TestContextType:999" } }; 325var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = handleId } }; 344var nestedArgs = new JsonObject { ["context"] = new JsonObject { ["$handle"] = nestedHandleId } }; 402var args = new JsonObject 404["context"] = new JsonObject { ["$handle"] = handleId }, 423var args = new JsonObject 425["context"] = new JsonObject { ["$handle"] = handleId }, 442var args = new JsonObject 444["context"] = new JsonObject { ["$handle"] = handleId }, 461var args = new JsonObject 463["context"] = new JsonObject { ["$handle"] = handleId } 494var args = new JsonObject 496["context"] = new JsonObject { ["$handle"] = handleId } 512var args = new JsonObject 514["context"] = new JsonObject { ["$handle"] = handleId }, 533var args = new JsonObject 535["context"] = new JsonObject { ["$handle"] = handleId }, 578var args = new JsonObject 601var args = new JsonObject 622var args = new JsonObject 645var args = new JsonObject 664var args = new JsonObject 692var args = new JsonObject { ["value"] = "test" }; 703var args = new JsonObject { ["value"] = "hello" }; 715var args = new JsonObject { ["value"] = "test" }; 729var args = new JsonObject 744var args = new JsonObject { ["count"] = 3 }; 761var args = new JsonObject 777var args = new JsonObject { ["value"] = "hello" }; 789var args = new JsonObject { ["value"] = 42 }; 825var args = new JsonObject 827["list"] = new JsonObject { ["$handle"] = listHandle }, 849var removeArgs = new JsonObject 851["list"] = new JsonObject { ["$handle"] = listHandle }, 860var lengthArgs = new JsonObject 862["list"] = new JsonObject { ["$handle"] = listHandle } 881var args = new JsonObject 883["list"] = new JsonObject { ["$handle"] = listHandle } 904var clearArgs = new JsonObject 906["list"] = new JsonObject { ["$handle"] = listHandle } 911var lengthArgs = new JsonObject 913["list"] = new JsonObject { ["$handle"] = listHandle } 949var args = new JsonObject 951["dict"] = new JsonObject { ["$handle"] = dictHandle }, 973var removeArgs = new JsonObject 975["dict"] = new JsonObject { ["$handle"] = dictHandle }, 984var countArgs = new JsonObject 986["dict"] = new JsonObject { ["$handle"] = dictHandle } 1006var hasArgs = new JsonObject 1008["dict"] = new JsonObject { ["$handle"] = dictHandle }, 1017var hasArgs2 = new JsonObject 1019["dict"] = new JsonObject { ["$handle"] = dictHandle }, 1039var args = new JsonObject 1041["dict"] = new JsonObject { ["$handle"] = dictHandle } 1065var args = new JsonObject 1067["dict"] = new JsonObject { ["$handle"] = dictHandle } 1082var args = new JsonObject 1099var args = new JsonObject 1116var args = new JsonObject 1133var args = new JsonObject 1150var result = dispatcher.Invoke("Aspire.Hosting.RemoteHost.Tests/acceptOptionalEnum", new JsonObject()); 1159var args = new JsonObject 1161["dto"] = new JsonObject 1178var args = new JsonObject 1180["dto"] = new JsonObject 1196var args = new JsonObject();
HandleRegistryTests.cs (7)
246var json = new JsonObject { ["$handle"] = "42" }; 275var json = new JsonObject { ["name"] = "test", ["value"] = 42 }; 285var json = new JsonObject { ["$handle"] = 42 }; 294var json = new JsonObject 310var json = new JsonObject { ["$handle"] = "1" }; 332var json = new JsonObject { ["name"] = "test" }; 341var json = new JsonObject { ["$handle"] = 42 };
ReferenceExpressionRefTests.cs (17)
18var json = new JsonObject 20["$expr"] = new JsonObject 39var json = new JsonObject 41["$expr"] = new JsonObject 46new JsonObject { ["$handle"] = "aspire/EndpointReference:1" }, 47new JsonObject { ["$handle"] = "aspire/EndpointReference:2" } 66var json = new JsonObject 92var json = new JsonObject 94["$expr"] = new JsonObject { ["format"] = "test" } 105var json = new JsonObject { ["format"] = "test" }; 138new JsonObject { ["$handle"] = handle1 }, 139new JsonObject { ["$handle"] = handle2 } 159new JsonObject { ["$handle"] = "aspire/NonExistent:999" } 198new JsonObject { ["$handle"] = handle }, 219new JsonObject { ["invalid"] = "not-a-handle" } // Invalid format (not a handle or string) 237var json = new JsonObject 239["$expr"] = new JsonObject
Aspire.Hosting.Tests (21)
JsonFlattenerTests.cs (20)
16var userSecrets = new JsonObject 19["Azure"] = new JsonObject 22["Deployments"] = new JsonObject 24["MyStorage"] = new JsonObject 50var userSecrets = new JsonObject 71var userSecrets = new JsonObject(); 84var userSecrets = new JsonObject 86["Level1"] = new JsonObject 88["Level2"] = new JsonObject 90["Level3"] = new JsonObject 110var userSecrets = new JsonObject 116["Nested"] = new JsonObject 139var userSecrets = new JsonObject 168var userSecrets = new JsonObject 171new JsonObject { ["Name"] = "Item1", ["Value"] = "Value1" }, 172new JsonObject { ["Name"] = "Item2", ["Value"] = "Value2" } 174["NestedConfig"] = new JsonObject 177new JsonObject 180["Settings"] = new JsonObject { ["Enabled"] = true } 203var userSecrets = new JsonObject
Publishing\DeploymentStateManagerTests.cs (1)
208var state = new JsonObject
Aspire.Hosting.Yarp (4)
YarpJsonConfigGeneratorBuilder.cs (4)
83var jsonObject = new JsonObject(); 84var jsonProxyConfig = jsonObject["ReverseProxy"] = new JsonObject(); 96var routesNode = new JsonObject(); 110var routesNode = new JsonObject();
aspire-server (6)
Ats\AtsCallbackProxyFactory.cs (1)
275args ??= new JsonObject();
Ats\CapabilityDispatcher.cs (2)
218return Task.FromResult<JsonNode?>(new JsonObject 469args ??= new JsonObject();
Ats\HandleRegistry.cs (1)
148return new JsonObject
RemoteAppHostService.cs (2)
89return new JsonObject 104return new JsonObject
ConfigurationSchemaGenerator (13)
ConfigSchemaEmitter.cs (13)
44var root = new JsonObject(); 59var propertiesNode = new JsonObject(s_ignoreCaseNodeOptions); 62var categoryNode = new JsonObject(); 67parent["definitions"] = new JsonObject 69["logLevel"] = new JsonObject 125propertiesNode = new JsonObject(s_ignoreCaseNodeOptions); 140pathSegmentNode = new JsonObject(); 246propertiesNode = new JsonObject(); 286var propertyNode = new JsonObject(); 319var containerNode = new JsonObject(); 632new JsonObject 637new JsonObject 640["items"] = new JsonObject
dotnet-user-jwts (5)
Helpers\JwtAuthenticationSchemeSettings.cs (4)
22var settingsObject = new JsonObject 38authentication.Add(SchemesKey, new JsonObject 46config[AuthenticationKey] = new JsonObject 48[SchemesKey] = new JsonObject
Helpers\SigningKeysHandler.cs (1)
75secrets ??= new JsonObject();
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (15)
IntegrationTests\AnonymousObjectIntegrationTest.cs (8)
171var doc = new JsonObject 173["data"] = new JsonObject 178new JsonObject 182new JsonObject { ["id"] = 100 }, 183new JsonObject 187new JsonObject { ["value"] = "old" }, 188new JsonObject { ["value"] = "target" }, 189new JsonObject { ["value"] = 999 }
JsonPatchDocumentJObjectTest.cs (6)
48var model = new ObjectWithJObject { CustomData = new JsonObject([new("Email", "foo@bar.com"), new("Name", "Bar")]) }; 65var model = new ObjectWithJObject { CustomData = new JsonObject([new("Email", "foo@bar.com")]) }; 81var model = new ObjectWithJObject { CustomData = new JsonObject([new("FirstName", "Bar"), new("LastName", "Bar")]) }; 97var model = new ObjectWithJObject { CustomData = new JsonObject([new("FirstName", "Bar")]) }; 147var model = new ObjectWithJObject { CustomData = new JsonObject([new("Email", "foo@bar.com"), new("Name", "Bar")]) }; 163var model = new ObjectWithJObject { CustomData = new JsonObject([new("Email", "foo@bar.com"), new("Name", "Bar")]) };
TestObjectModels\ObjectWithJObject.cs (1)
10public JsonObject CustomData { get; set; } = new JsonObject();
Microsoft.AspNetCore.OpenApi (23)
Extensions\JsonNodeSchemaExtensions.cs (1)
398var mappings = new JsonObject();
Schemas\OpenApiJsonSchema.Helpers.cs (1)
154var obj = new JsonObject();
Services\Schemas\OpenApiSchemaService.cs (21)
64schema = new JsonObject 73schema = new JsonObject 76[OpenApiSchemaKeywords.ItemsKeyword] = new JsonObject 93schema = new JsonObject(); 141var addReplaceTest = new JsonObject() 146[OpenApiSchemaKeywords.PropertiesKeyword] = new JsonObject 148["op"] = new JsonObject() 153["path"] = new JsonObject() 157["value"] = new JsonObject() 161var moveCopy = new JsonObject() 166[OpenApiSchemaKeywords.PropertiesKeyword] = new JsonObject 168["op"] = new JsonObject() 173["path"] = new JsonObject() 177["from"] = new JsonObject() 184var remove = new JsonObject() 189[OpenApiSchemaKeywords.PropertiesKeyword] = new JsonObject 191["op"] = new JsonObject() 196["path"] = new JsonObject() 203return new JsonObject 207[OpenApiSchemaKeywords.ItemsKeyword] = new JsonObject 491var newObject = new JsonObject();
Microsoft.AspNetCore.OpenApi.Tests (2)
Extensions\JsonNodeSchemaExtensionsTests.cs (2)
101var schema = new JsonObject(); 139var schema = new JsonObject();
Microsoft.DotNet.Internal.SymbolHelper (3)
SymbolPromotionHelper.cs (3)
103JsonObject registrationPayload = new() 123JsonObject visibilityPayload = new() 252JsonObject extensionPayload = new()
Microsoft.Extensions.AI (2)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (2)
162schema = JsonSerializer.SerializeToElement(new JsonObject 166{ "properties", new JsonObject { { "data", JsonElementToJsonNode(schema) } } },
Microsoft.Extensions.AI.Abstractions (9)
Utilities\AIJsonUtilities.Schema.Create.cs (7)
89JsonObject parameterSchemas = new(); 142JsonNode schema = new JsonObject(); 254return schemaObj ?? new JsonObject(); 259return new JsonObject { [TypePropertyName] = null }; 304objSchema.Add(ItemsPropertyName, new JsonObject()); 405schema = obj = new() { [NotPropertyName] = true }; 642(JsonObject)(obj[NotPropertyName] = new JsonObject());
Utilities\AIJsonUtilities.Schema.Transform.cs (2)
50schema = new JsonObject { [NotPropertyName] = (JsonNode)true }; 58schema = new JsonObject();
Microsoft.Extensions.AI.Abstractions.Tests (2)
test\Shared\JsonSchemaExporter\TestTypes.cs (1)
105yield return new TestData<JsonObject>(new() { ["x"] = 42 }, """{"type":["object","null"]}""");
Utilities\AIJsonUtilitiesTests.cs (1)
273? new JsonObject
Microsoft.Extensions.AI.Evaluation.Quality (1)
AIToolExtensions.cs (1)
25new JsonObject
Microsoft.Extensions.AI.Evaluation.Safety (13)
ContentSafetyServicePayloadUtilities.cs (13)
149new JsonObject 200var item = new JsonObject(); 231new JsonObject 282yield return new JsonObject 297yield return new JsonObject 306yield return new JsonObject 322yield return new JsonObject 330yield return new JsonObject 334new JsonObject 342yield return new JsonObject 346new JsonObject 357new JsonObject 362new JsonObject
ServiceBus.AppHost (1)
Program.cs (1)
36document["UserConfig"]!["Logging"] = new JsonObject { ["Type"] = "Console" };
Shared.Tests (1)
JsonSchemaExporter\TestTypes.cs (1)
105yield return new TestData<JsonObject>(new() { ["x"] = 42 }, """{"type":["object","null"]}""");
Stress.ApiService (1)
Program.cs (1)
310var jsonWithUrl = new JsonObject
System.Text.Json (10)
System\Text\Json\Nodes\JsonObject.cs (4)
64JsonValueKind.Object => new JsonObject(element, options), 90? new JsonObject(jsonElement.Value.Clone(), Options) 91: new JsonObject(Options); 94var jObject = new JsonObject(Options)
System\Text\Json\Schema\JsonSchema.cs (2)
158var objSchema = new JsonObject(); 192var properties = new JsonObject();
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
89node = new JsonObject(element, options);
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (3)
15jsonTypeInfo.CreateObjectForExtensionDataProperty = () => new JsonObject(options.GetNodeOptions()); 79return new JsonObject(jElement, options); 86JsonObject jObject = new JsonObject(options);
TestProject.AppHost (3)
TestProgram.cs (3)
172var root = new JsonObject(); 175var projectJson = new JsonObject(); 189var endpointJsonObject = new JsonObject
721 references to JsonObject
aspire (97)
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (5)
177var config = JsonNode.Parse(content)?.AsObject(); 184if (config.TryGetPropertyValue("mcpServers", out var serversNode) && serversNode is JsonObject servers) 216var config = await McpConfigFileHelper.ReadConfigAsync(configFilePath, cancellationToken); 219if (!config.ContainsKey("mcpServers") || config["mcpServers"] is not JsonObject) 224var servers = config["mcpServers"]!.AsObject();
Agents\CopilotCli\CopilotCliAgentEnvironmentScanner.cs (5)
160var config = JsonNode.Parse(content)?.AsObject(); 167if (config.TryGetPropertyValue("mcpServers", out var serversNode) && serversNode is JsonObject servers) 212var config = await McpConfigFileHelper.ReadConfigAsync(configFilePath, cancellationToken); 215if (!config.ContainsKey("mcpServers") || config["mcpServers"] is not JsonObject) 220var servers = config["mcpServers"]!.AsObject();
Agents\DeprecatedMcpCommandScanner.cs (16)
65var config = JsonNode.Parse(content)?.AsObject(); 104private static bool HasDeprecatedMcpCommand(JsonObject config, AgentConfigLocation location) 118private static bool HasDeprecatedMcpServersArgs(JsonObject config, string serversKey) 120if (!config.TryGetPropertyValue(serversKey, out var serversNode) || serversNode is not JsonObject servers) 125if (!servers.TryGetPropertyValue("aspire", out var aspireNode) || aspireNode is not JsonObject aspire) 150private static bool HasDeprecatedMcpCommandArray(JsonObject config, string serversKey) 152if (!config.TryGetPropertyValue(serversKey, out var mcpNode) || mcpNode is not JsonObject mcp) 157if (!mcp.TryGetPropertyValue("aspire", out var aspireNode) || aspireNode is not JsonObject aspire) 182private AgentEnvironmentApplicator CreateUpdateApplicator(AgentConfigLocation location, string configPath, JsonObject config) 198private async Task UpdateConfigAsync(AgentConfigLocation location, string configPath, JsonObject config, CancellationToken cancellationToken) 220private static void UpdateMcpServersArgs(JsonObject config, string serversKey) 223serversNode is JsonObject servers && 225aspireNode is JsonObject aspire) 234private static void UpdateMcpCommandArray(JsonObject config, string serversKey) 237mcpNode is JsonObject mcp && 239aspireNode is JsonObject aspire)
Agents\McpConfigFileHelper.cs (6)
40var config = JsonNode.Parse(content)?.AsObject(); 47if (config.TryGetPropertyValue(serverContainerKey, out var serversNode) && serversNode is JsonObject servers) 61/// Reads an existing MCP config file and parses it into a <see cref="JsonObject"/>, or creates a new one if the file doesn't exist. 66/// <returns>The parsed <see cref="JsonObject"/> from the file, or a new empty <see cref="JsonObject"/> if the file doesn't exist.</returns> 68public static async Task<JsonObject> ReadConfigAsync(string configFilePath, CancellationToken cancellationToken, Func<string, string>? preprocessContent = null)
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (5)
125var config = JsonNode.Parse(content)?.AsObject(); 132if (config.TryGetPropertyValue("mcp", out var mcpNode) && mcpNode is JsonObject mcp) 200var config = await McpConfigFileHelper.ReadConfigAsync(configFilePath, cancellationToken, RemoveJsonComments); 209if (!config.ContainsKey("mcp") || config["mcp"] is not JsonObject) 214var mcp = config["mcp"]!.AsObject();
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (5)
211var config = JsonNode.Parse(content)?.AsObject(); 218if (config.TryGetPropertyValue("servers", out var serversNode) && serversNode is JsonObject servers) 256var config = await McpConfigFileHelper.ReadConfigAsync(mcpConfigPath, cancellationToken); 259if (!config.ContainsKey("servers") || config["servers"] is not JsonObject) 264var servers = config["servers"]!.AsObject();
Commands\SecretListCommand.cs (1)
60var obj = new JsonObject();
Configuration\ConfigurationService.cs (14)
17JsonObject settings; 67var settings = JsonNode.Parse(existingContent)?.AsObject(); 163var settings = JsonNode.Parse(content)?.AsObject(); 181private static void SetNestedValue(JsonObject settings, string key, string value) 189var currentObject = settings; 197if (!currentObject.ContainsKey(part) || currentObject[part] is not JsonObject) 214private static void RemoveConflictingFlattenedKeys(JsonObject settings, string[] keyParts) 227if (settings.ContainsKey(partialKey) && settings[partialKey] is not JsonObject) 239private static bool DeleteNestedValue(JsonObject settings, string key) 242var currentObject = settings; 243var objectPath = new List<(JsonObject obj, string key)>(); 251if (!currentObject.ContainsKey(part) || currentObject[part] is not JsonObject) 293private static void FlattenJsonObject(JsonObject obj, Dictionary<string, string> result, string prefix) 299if (kvp.Value is JsonObject nestedObj)
JsonSourceGenerationContext.cs (1)
19[JsonSerializable(typeof(JsonObject))]
Projects\FallbackProjectParser.cs (5)
121var rootObject = new JsonObject(); 124var itemsObject = new JsonObject(); 130var packageObj = new JsonObject(); 141var projectObj = new JsonObject(); 151var propertiesObject = new JsonObject();
src\Shared\ConsoleLogs\SharedAIHelpers.cs (10)
95var dto = GetLogEntryDto(logEntry, promptContext, getResourceName, dashboardBaseUrl); 144var dto = GetTraceDto(trace, promptContext, getResourceName, dashboardBaseUrl); 206public static JsonObject GetTraceDto( 218var attributesObj = new JsonObject(); 249var spanObj = new JsonObject 274var traceData = new JsonObject 573public static JsonObject GetLogEntryDto( 584var attributesObject = new JsonObject(); 592var log = new JsonObject 613public static JsonObject? GetDashboardLinkObject(string dashboardBaseUrl, string path, string text)
src\Shared\Json\JsonFlattener.cs (13)
16public static JsonObject FlattenJsonObject(JsonObject source) 18var result = new JsonObject(); 26public static JsonObject UnflattenJsonObject(JsonObject source) 28var result = new JsonObject(); 33var current = result; 38if (!current.TryGetPropertyValue(key, out var existing) || existing is not JsonObject) 40var newObject = new JsonObject(); 56private static void FlattenJsonObjectRecursive(JsonObject source, string prefix, JsonObject result) 66if (kvp.Value is JsonObject nestedObject) 75if (array[i] is JsonObject arrayObject)
src\Shared\UserSecrets\SecretsStore.cs (3)
87var obj = new JsonObject(); 135var parsed = JsonNode.Parse(json)?.AsObject(); 142var flat = JsonFlattener.FlattenJsonObject(parsed);
Utils\EnvironmentChecker\DeprecatedAgentConfigCheck.cs (8)
54var config = JsonNode.Parse(content)?.AsObject(); 89private static bool HasDeprecatedMcpCommand(JsonObject config, AgentConfigLocation location) 103private static bool HasDeprecatedMcpServersArgs(JsonObject config, string serversKey) 105if (!config.TryGetPropertyValue(serversKey, out var serversNode) || serversNode is not JsonObject servers) 110if (!servers.TryGetPropertyValue("aspire", out var aspireNode) || aspireNode is not JsonObject aspire) 135private static bool HasDeprecatedMcpCommandArray(JsonObject config, string serversKey) 137if (!config.TryGetPropertyValue(serversKey, out var mcpNode) || mcpNode is not JsonObject mcp) 142if (!mcp.TryGetPropertyValue("aspire", out var aspireNode) || aspireNode is not JsonObject aspire)
Aspire.Cli.Tests (89)
Agents\CopilotCliAgentEnvironmentScannerTests.cs (8)
61var config = JsonNode.Parse(content)?.AsObject(); 65var servers = config["mcpServers"]?.AsObject(); 69var aspireServer = servers["aspire"]?.AsObject(); 81var env = aspireServer["env"]?.AsObject(); 100var existingConfig = new JsonObject 122var config = JsonNode.Parse(content)?.AsObject(); 125var servers = config["mcpServers"]?.AsObject(); 140var existingConfig = new JsonObject
Agents\NpmProvenanceCheckerTests.cs (3)
85var statement = new JsonObject 216var statement = new JsonObject 247var attestationResponse = new JsonObject
Agents\VsCodeAgentEnvironmentScannerTests.cs (10)
147var config = JsonNode.Parse(content)?.AsObject(); 151var servers = config["servers"]?.AsObject(); 155var aspireServer = servers["aspire"]?.AsObject(); 177var existingConfig = new JsonObject 200var config = JsonNode.Parse(content)?.AsObject(); 203var servers = config["servers"]?.AsObject(); 218var existingConfig = new JsonObject 246var config = JsonNode.Parse(content)?.AsObject(); 247var aspireServer = config?["servers"]?["aspire"]?.AsObject(); 254var otherServer = config?["servers"]?["other-server"]?.AsObject();
Commands\ConfigCommandTests.cs (13)
75var settings = JsonNode.Parse(json)?.AsObject(); 98var settings = JsonNode.Parse(json)?.AsObject(); 100Assert.True(settings["foo"] is JsonObject); 101var fooObject = settings["foo"]!.AsObject(); 123var settings = JsonNode.Parse(json)?.AsObject(); 126Assert.True(settings["foo"] is JsonObject); 127var fooObject = settings["foo"]!.AsObject(); 128Assert.True(fooObject["bar"] is JsonObject); 129var barObject = fooObject["bar"]!.AsObject(); 155var settings = JsonNode.Parse(json)?.AsObject(); 158Assert.True(settings["foo"] is JsonObject); 159var fooObject = settings["foo"]!.AsObject(); 275var settings = JsonNode.Parse(json)?.AsObject();
Mcp\ListStructuredLogsToolTests.cs (8)
198var firstLog = logsArray[0]?.AsObject(); 202var firstLogAttributes = firstLog["attributes"]?.AsObject(); 208var firstDashboardLink = firstLog["dashboard_link"]?.AsObject(); 214var secondLog = logsArray[1]?.AsObject(); 218var secondLogAttributes = secondLog["attributes"]?.AsObject(); 222var secondDashboardLink = secondLog["dashboard_link"]?.AsObject(); 228var thirdLog = logsArray[2]?.AsObject(); 233var thirdDashboardLink = thirdLog["dashboard_link"]?.AsObject();
Mcp\ListTracesToolTests.cs (7)
171var firstTrace = tracesArray[0]?.AsObject(); 181var firstDashboardLink = firstTrace["dashboard_link"]?.AsObject(); 187var serverSpan = spans.FirstOrDefault(s => s?["kind"]?.GetValue<string>() == "Server")?.AsObject(); 193var clientSpan = spans.FirstOrDefault(s => s?["kind"]?.GetValue<string>() == "Client")?.AsObject(); 199var secondTrace = tracesArray[1]?.AsObject(); 203var secondDashboardLink = secondTrace["dashboard_link"]?.AsObject(); 214var internalSpan = secondTraceSpans[0]?.AsObject();
Projects\ProjectUpdaterTests.cs (40)
71var itemsAndProperties = new JsonObject(); 182var itemsAndProperties = new JsonObject(); 320var itemsAndProperties = new JsonObject(); 463var itemsAndProperties = new JsonObject(); 624var itemsAndProperties = new JsonObject(); 742var itemsAndProperties = new JsonObject(); 844var itemsAndProperties = new JsonObject(); 977var itemsAndProperties = new JsonObject(); 1094var itemsAndProperties = new JsonObject(); 1214var itemsAndProperties = new JsonObject(); 1327var itemsAndProperties = new JsonObject(); 1694var itemsAndProperties = new JsonObject(); 1776var itemsAndProperties = new JsonObject(); 1859var itemsAndProperties = new JsonObject(); 1940var itemsAndProperties = new JsonObject(); 2029var itemsAndProperties = new JsonObject(); 2108var itemsAndProperties = new JsonObject(); 2188var itemsAndProperties = new JsonObject(); 2315var itemsAndProperties = new JsonObject(); 2611public static JsonObject WithSdkVersion(this JsonObject root, string sdkVersion) 2615JsonObject properties = new JsonObject(); 2625public static JsonObject WithMSBuildOutput(this JsonObject root) 2627JsonObject items = new JsonObject(); 2649public static JsonObject WithPackageReference(this JsonObject root, string packageId, string packageVersion) 2652var items = root["Items"]!.AsObject(); 2655JsonObject newPackageReference = new JsonObject 2665public static JsonObject WithPackageReferenceWithoutVersion(this JsonObject root, string packageId) 2668var items = root["Items"]!.AsObject(); 2671JsonObject newPackageReference = new JsonObject 2681public static JsonObject WithProjectReference(this JsonObject root, string fullPath) 2684var items = root["Items"]!.AsObject(); 2687JsonObject newProjectReference = new JsonObject 2696public static JsonObject WithProperty(this JsonObject root, string propertyName, string propertyValue) 2698JsonObject properties = new JsonObject();
Aspire.Dashboard (24)
Model\Assistant\AIHelpers.cs (3)
65var urlObj = new JsonObject 88var healthObj = new JsonObject 104var resourceObj = new JsonObject
Model\GenAI\GenAIItemPartViewModel.cs (3)
69JsonObject obj when obj.Count == 0 => string.Empty, 94private static JsonObject ToJsonObject(Dictionary<string, JsonElement> dict) 96var jsonObject = new JsonObject();
Model\GenAI\GenAISchemaHelpers.cs (4)
19internal static OpenApiSchema? ParseOpenApiSchema(JsonObject schemaObj) 28if (schemaObj["properties"] is JsonObject propsObj) 33if (prop.Value is JsonObject propSchemaObj) 45if (schemaObj["items"] is JsonObject itemsObj)
Model\GenAI\GenAIVisualizerDialogViewModel.cs (2)
95if (item is not JsonObject obj) 108if (obj["parameters"] is JsonObject paramsObj)
Otlp\Model\OtlpHelpers.cs (2)
144static JsonObject ConvertKeyValues(KeyValueList value) 146var o = new JsonObject();
src\Shared\ConsoleLogs\SharedAIHelpers.cs (10)
95var dto = GetLogEntryDto(logEntry, promptContext, getResourceName, dashboardBaseUrl); 144var dto = GetTraceDto(trace, promptContext, getResourceName, dashboardBaseUrl); 206public static JsonObject GetTraceDto( 218var attributesObj = new JsonObject(); 249var spanObj = new JsonObject 274var traceData = new JsonObject 573public static JsonObject GetLogEntryDto( 584var attributesObject = new JsonObject(); 592var log = new JsonObject 613public static JsonObject? GetDashboardLinkObject(string dashboardBaseUrl, string path, string text)
Aspire.Dashboard.Tests (4)
Integration\OtlpGrpcServiceTests.cs (1)
164var configJson = new JsonObject
Integration\StartupTests.cs (1)
634var configJson = new JsonObject
Model\GenAISchemaHelpersTests.cs (2)
186var schemaObj = JsonNode.Parse(schemaJson) as JsonObject;
Aspire.Hosting (52)
Ats\AtsError.cs (4)
43public JsonObject ToJsonObject() 45var obj = new JsonObject 94public JsonObject ToJsonObject() 96var obj = new JsonObject();
Dashboard\DashboardEventHandlers.cs (3)
147var configJson = JsonNode.Parse(configText)?.AsObject(); 239var configJson = JsonNode.Parse(originalConfigText)?.AsObject(); 926public JsonObject? State { get; set; }
Devcontainers\DevcontainerSettingsWriter.cs (8)
120var settings = (JsonObject)JsonObject.Parse(settingsContent)!; 122JsonObject? portsAttributes; 130portsAttributes = (JsonObject)portsAttributesNode!; 146let attrs = props.Value as JsonObject 166JsonObject? portAttributes; 174portAttributes = (JsonObject)portAttributeNode!;
Pipelines\DeploymentStateSection.cs (3)
19public sealed class DeploymentStateSection(string sectionName, JsonObject? data, long version) 35/// The <see cref="JsonObject"/> returned by this property is NOT thread-safe. 38public JsonObject Data { get; } = data ?? [];
Pipelines\Internal\DeploymentStateManagerBase.cs (13)
47private JsonObject? _state; 63protected abstract Task SaveStateToStorageAsync(JsonObject state, CancellationToken cancellationToken); 70protected async Task<JsonObject> LoadStateAsync(CancellationToken cancellationToken = default) 91var flattenedState = JsonNode.Parse(fileContent, documentOptions: jsonDocumentOptions)!.AsObject(); 109public async Task SaveStateAsync(JsonObject state, CancellationToken cancellationToken = default) 146JsonObject? data = null; 150if (sectionData is JsonObject o) 180private static JsonNode? TryGetNestedPropertyValue(JsonObject? node, string path) 192if (current is not JsonObject currentObj || !currentObj.TryGetPropertyValue(segment, out var nextNode)) 280private static void SetNestedPropertyValue(JsonObject root, string path, JsonObject? value) 284var current = root; 288if (!current.TryGetPropertyValue(segment, out var nextNode) || nextNode is not JsonObject nextObj)
Pipelines\Internal\FileDeploymentStateManager.cs (2)
80protected override async Task SaveStateToStorageAsync(JsonObject state, CancellationToken cancellationToken) 97var flattenedSecrets = JsonFlattener.FlattenJsonObject(state);
Pipelines\Internal\JsonFlattener.cs (13)
19public static JsonObject FlattenJsonObject(JsonObject source) 21var result = new JsonObject(); 32public static JsonObject UnflattenJsonObject(JsonObject source) 34var result = new JsonObject(); 39var current = result; 44if (!current.TryGetPropertyValue(key, out var existing) || existing is not JsonObject) 46var newObject = new JsonObject(); 62private static void FlattenJsonObjectRecursive(JsonObject source, string prefix, JsonObject result) 72if (kvp.Value is JsonObject nestedObject) 81if (array[i] is JsonObject arrayObject)
Pipelines\Internal\UserSecretsDeploymentStateManager.cs (1)
35protected override async Task SaveStateToStorageAsync(JsonObject state, CancellationToken cancellationToken)
UserSecrets\IUserSecretsManager.cs (1)
51Task SaveStateAsync(JsonObject state, CancellationToken cancellationToken = default);
UserSecrets\NoopUserSecretsManager.cs (1)
40public Task SaveStateAsync(JsonObject state, CancellationToken cancellationToken = default)
UserSecrets\UserSecretsManagerFactory.cs (3)
141public async Task SaveStateAsync(JsonObject state, CancellationToken cancellationToken = default) 146var flattenedState = JsonFlattener.FlattenJsonObject(state); 180var contents = new JsonObject();
Aspire.Hosting.Azure (16)
AzureBicepResource.cs (4)
386if (JsonNode.Parse(responseContent) is JsonObject responseObj) 388if (responseObj["error"] is JsonObject errorObj) 408if (responseObj["properties"]?["error"] is JsonObject deploymentErrorObj) 431if (detail is JsonObject detailObj)
Provisioning\BicepUtilities.cs (6)
30public static async Task SetParametersAsync(JsonObject parameters, AzureBicepResource resource, bool skipKnownValues = false, CancellationToken cancellationToken = default) 66public static async Task SetScopeAsync(JsonObject scope, AzureBicepResource resource, CancellationToken cancellationToken = default) 84public static string GetChecksum(AzureBicepResource resource, JsonObject parameters, JsonObject? scope) 115var parameters = JsonNode.Parse(jsonString)?.AsObject(); 116var scope = section["Scope"] is string scopeString
Provisioning\Internal\BaseProvisioningContextProvider.cs (1)
173var azureSection = azureStateSection.Data;
Provisioning\JsonExtensions.cs (1)
12var jsonObj = obj.AsObject();
Provisioning\Provisioners\BicepProvisioner.cs (4)
163var parameters = new JsonObject(); 166var scope = new JsonObject(); 235var outputObj = outputs?.ToObjectFromJson<JsonObject>();
Aspire.Hosting.Azure.Tests (34)
AzureDeployerTests.cs (1)
1430var cachedState = new JsonObject
BicepUtilitiesTests.cs (27)
22var parameters = new JsonObject(); 58var parameters = new JsonObject(); 109var parameters0 = new JsonObject(); 113var parameters1 = new JsonObject(); 136var parameters0 = new JsonObject(); 140var parameters1 = new JsonObject(); 160var parameters0 = new JsonObject(); 161var scope0 = new JsonObject(); 166var parameters1 = new JsonObject(); 167var scope1 = new JsonObject(); 188var parameters0 = new JsonObject(); 189var scope0 = new JsonObject(); 194var parameters1 = new JsonObject(); 195var scope1 = new JsonObject(); 211var parameters = new JsonObject 231var parameters1 = new JsonObject 236var parameters2 = new JsonObject 256var parameters = new JsonObject 261var scope1 = new JsonObject { ["resourceGroup"] = "rg1" }; 262var scope2 = new JsonObject { ["resourceGroup"] = "rg2" }; 284var parameters1 = new JsonObject 289var parameters2 = new JsonObject 319var parameters = new JsonObject(); 339var scope = new JsonObject(); 357var scope = new JsonObject(); 411var parameters = new JsonObject 445var parameters = new JsonObject
JsonExtensionsTests.cs (3)
14var rootJson = new JsonObject(); 30var rootJson = new JsonObject(); 44var rootJson = new JsonObject();
ProvisioningTestHelpers.cs (3)
610private readonly JsonObject _state = []; 616var sectionData = _state.TryGetPropertyValue(sectionName, out var node) && node is JsonObject obj
Aspire.Hosting.RemoteHost.Tests (108)
AtsMarshallerTests.cs (23)
225var json = new JsonObject { ["$handle"] = handleId }; 237var json = new JsonObject { ["$handle"] = "aspire/Unknown:999" }; 273var json = new JsonObject { ["key1"] = 1, ["key2"] = 2 }; 391Assert.IsType<JsonObject>(result); 392var jsonObj = (JsonObject)result; 410Assert.IsType<JsonObject>(result); 411var jsonObj = (JsonObject)result; 429Assert.IsType<JsonObject>(result); 430var jsonObj = (JsonObject)result; 515var json = new JsonObject { ["a"] = 1, ["b"] = 2 }; 528var json = new JsonObject { ["value"] = 42 }; 541var json = new JsonObject { ["name"] = "test", ["count"] = 5 }; 560Assert.IsType<JsonObject>(result); 561var jsonObj = (JsonObject)result; 583Assert.IsType<JsonObject>(result); 584var jsonObj = (JsonObject)result; 593var json = new JsonObject { ["label"] = "item", ["status"] = "ValueA" }; 607var json = new JsonObject { ["label"] = "test", ["status"] = "valueb" };
CallbackProxyTests.cs (6)
125var args = invoker.Invocations[0].Args as JsonObject; 142var args = invoker.Invocations[0].Args as JsonObject; 174var args = invoker.Invocations[0].Args as JsonObject;
CapabilityDispatcherTests.cs (64)
167var args = new JsonObject { ["value"] = "hello" }; 179var args = new JsonObject { ["required"] = "test" }; 191var args = new JsonObject { ["required"] = "test", ["optional"] = "custom" }; 232var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = handleId } }; 259var args = new JsonObject { ["context"] = "not-a-handle" }; 271var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = "Aspire.Hosting.RemoteHost.Tests/Aspire.Hosting.RemoteHost.Tests.TestContextType:999" } }; 325var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = handleId } }; 332var handleRef = result.AsObject(); 344var nestedArgs = new JsonObject { ["context"] = new JsonObject { ["$handle"] = nestedHandleId } }; 402var args = new JsonObject 423var args = new JsonObject 442var args = new JsonObject 461var args = new JsonObject 494var args = new JsonObject 512var args = new JsonObject 533var args = new JsonObject 578var args = new JsonObject 601var args = new JsonObject 622var args = new JsonObject 630var callbackArgs = invoker.Invocations[0].Args as JsonObject; 645var args = new JsonObject 664var args = new JsonObject 692var args = new JsonObject { ["value"] = "test" }; 703var args = new JsonObject { ["value"] = "hello" }; 715var args = new JsonObject { ["value"] = "test" }; 729var args = new JsonObject 744var args = new JsonObject { ["count"] = 3 }; 761var args = new JsonObject 777var args = new JsonObject { ["value"] = "hello" }; 789var args = new JsonObject { ["value"] = 42 }; 808var resultObj = result as JsonObject; 821var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 825var args = new JsonObject 845var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 849var removeArgs = new JsonObject 860var lengthArgs = new JsonObject 878var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 881var args = new JsonObject 900var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 904var clearArgs = new JsonObject 911var lengthArgs = new JsonObject 932var resultObj = result as JsonObject; 945var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 949var args = new JsonObject 969var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 973var removeArgs = new JsonObject 984var countArgs = new JsonObject 1002var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1006var hasArgs = new JsonObject 1017var hasArgs2 = new JsonObject 1036var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1039var args = new JsonObject 1062var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1065var args = new JsonObject 1082var args = new JsonObject 1099var args = new JsonObject 1116var args = new JsonObject 1133var args = new JsonObject 1159var args = new JsonObject 1178var args = new JsonObject 1196var args = new JsonObject();
HandleRegistryTests.cs (8)
170var json = registry.Marshal(obj, "aspire/TestObject"); 246var json = new JsonObject { ["$handle"] = "42" }; 275var json = new JsonObject { ["name"] = "test", ["value"] = 42 }; 285var json = new JsonObject { ["$handle"] = 42 }; 294var json = new JsonObject 310var json = new JsonObject { ["$handle"] = "1" }; 332var json = new JsonObject { ["name"] = "test" }; 341var json = new JsonObject { ["$handle"] = 42 };
ReferenceExpressionRefTests.cs (7)
18var json = new JsonObject 39var json = new JsonObject 66var json = new JsonObject 92var json = new JsonObject 105var json = new JsonObject { ["format"] = "test" }; 237var json = new JsonObject 252((JsonObject)json["$expr"]!)["valueProviders"] = providersArray;
Aspire.Hosting.Tests (23)
JsonFlattenerTests.cs (16)
16var userSecrets = new JsonObject 34var result = JsonFlattener.FlattenJsonObject(userSecrets); 50var userSecrets = new JsonObject 58var result = JsonFlattener.FlattenJsonObject(userSecrets); 71var userSecrets = new JsonObject(); 74var result = JsonFlattener.FlattenJsonObject(userSecrets); 84var userSecrets = new JsonObject 99var result = JsonFlattener.FlattenJsonObject(userSecrets); 110var userSecrets = new JsonObject 124var result = JsonFlattener.FlattenJsonObject(userSecrets); 139var userSecrets = new JsonObject 147var result = JsonFlattener.FlattenJsonObject(userSecrets); 168var userSecrets = new JsonObject 187var result = JsonFlattener.FlattenJsonObject(userSecrets); 203var userSecrets = new JsonObject 210var result = JsonFlattener.FlattenJsonObject(userSecrets);
Orchestrator\ParameterProcessorTests.cs (5)
1574private readonly JsonObject _unflattenedState = []; 1575private JsonObject? _flattenedState; 1578public JsonObject State => _flattenedState ?? []; 1584var sectionData = _unflattenedState.TryGetPropertyValue(sectionName, out var sectionNode) && sectionNode is JsonObject obj
Publishing\DeploymentStateManagerTests.cs (1)
208var state = new JsonObject
Utils\MockUserSecretsManager.cs (1)
23public Task SaveStateAsync(JsonObject state, CancellationToken cancellationToken = default)
Aspire.Hosting.Yarp (5)
YarpJsonConfigGeneratorBuilder.cs (5)
83var jsonObject = new JsonObject(); 94private JsonObject AddRoutes() 96var routesNode = new JsonObject(); 108private JsonObject AddClusters() 110var routesNode = new JsonObject();
aspire-server (28)
Ats\AtsCallbackProxyFactory.cs (10)
123var jsonObjectType = typeof(JsonObject); 182argsExpr ?? Expression.Constant(null, typeof(JsonObject)), 196argsExpr ?? Expression.Constant(null, typeof(JsonObject)), 210argsExpr ?? Expression.Constant(null, typeof(JsonObject)), 224argsExpr ?? Expression.Constant(null, typeof(JsonObject)), 228private void InvokeSyncVoid(string callbackId, JsonObject? args, CancellationToken cancellationToken) 234private T? InvokeSyncResult<T>(string callbackId, JsonObject? args, CancellationToken cancellationToken) 241private async Task InvokeAsyncVoid(string callbackId, JsonObject? args, CancellationToken cancellationToken) 247private async Task<T?> InvokeAsyncResult<T>(string callbackId, JsonObject? args, CancellationToken cancellationToken) 270private void AddCancellationTokenToArgs(ref JsonObject? args, CancellationToken cancellationToken)
Ats\AtsMarshaller.cs (1)
399if (node is JsonObject jsonObj)
Ats\CapabilityDispatcher.cs (10)
20JsonObject? args, 461public async Task<JsonNode?> InvokeAsync(string capabilityId, JsonObject? args) 503public JsonNode? Invoke(string capabilityId, JsonObject? args) 540public static string GetRequiredString(this JsonObject args, string name, string capabilityId) 554public static string? GetOptionalString(this JsonObject args, string name) 566public static int? GetOptionalInt(this JsonObject args, string name) 579this JsonObject args, 609public static T? GetDto<T>(this JsonObject args, string name) where T : class 611if (args.TryGetPropertyValue(name, out var node) && node is JsonObject obj) 621public static JsonObject CreateHandleResult(this HandleRegistry handles, object obj, string typeId)
Ats\HandleRegistry.cs (3)
145public JsonObject Marshal(object obj, string typeId) 198if (node is JsonObject obj && obj.TryGetPropertyValue("$handle", out var handleNode)) 214return node is JsonObject obj && obj.ContainsKey("$handle");
Ats\ReferenceExpressionRef.cs (3)
57if (node is not JsonObject obj || !obj.TryGetPropertyValue("$expr", out var exprNode)) 62if (exprNode is not JsonObject exprObj) 101return node is JsonObject obj && obj.ContainsKey("$expr");
RemoteAppHostService.cs (1)
71public async Task<JsonNode?> InvokeCapabilityAsync(string capabilityId, JsonObject? args)
ConfigurationSchemaGenerator (23)
ConfigSchemaEmitter.cs (23)
44var root = new JsonObject(); 51private void GenerateLogCategories(JsonObject parent) 59var propertiesNode = new JsonObject(s_ignoreCaseNodeOptions); 62var categoryNode = new JsonObject(); 76private void GenerateGraph(JsonObject rootNode) 101private bool GeneratePathSegment(JsonObject currentNode, TypeSpec type, Queue<string> pathSegments) 123if (currentNode[propertiesName] is not JsonObject propertiesNode) 132if (propertiesNode[pathSegment] is not JsonObject pathSegmentNode) 182private bool GenerateType(JsonObject currentNode, TypeSpec type) 226private bool GenerateObject(JsonObject currentNode, ObjectSpec objectSpec) 244if (currentNode["properties"] is not JsonObject propertiesNode) 275private bool GenerateProperty(JsonObject currentNode, PropertySpec property, IPropertySymbol? propertySymbol) 286var propertyNode = new JsonObject(); 306private bool GenerateCollection(JsonObject currentNode, CollectionSpec collection, string typeName, string containerName) 319var containerNode = new JsonObject(); 334private static void RestoreBackup(JsonNode? backupNode, string name, JsonObject parentNode) 434private static void GenerateDescriptionFromDocComment(JsonObject propertyNode, string docComment) 490private void GenerateDescriptionForType(JsonObject currentNode, TypeSpec type) 587private void GenerateParsableFromString(JsonObject propertyNode, ParsableFromStringSpec parsable) 678private bool IsExcluded(JsonObject currentNode, PropertySpec property) 718private static void ReplaceNodeWithKeyCasingChange(JsonObject jsonObject, string key, JsonNode value) 739case JsonObject obj: 743obj.Parent is JsonObject && obj.GetPropertyName() == "properties" ?
dotnet-user-jwts (11)
Helpers\JwtAuthenticationSchemeSettings.cs (9)
19var config = JsonSerializer.Deserialize<JsonObject>(reader, JwtSerializerOptions.Default); 22var settingsObject = new JsonObject 28if (config[AuthenticationKey] is JsonObject authentication) 30if (authentication[SchemesKey] is JsonObject schemes) 67var config = JsonSerializer.Deserialize<JsonObject>(reader, JwtSerializerOptions.Default); 70if (config[AuthenticationKey] is JsonObject authentication && 71authentication[SchemesKey] is JsonObject schemes)
Helpers\SigningKeysHandler.cs (2)
65JsonObject secrets = null; 71secrets = JsonSerializer.Deserialize<JsonObject>(secretsFileStream, JwtSerializerOptions.Default);
IdentitySample.PasskeyConformance (1)
Data\ServerPublicKeyCredentialOptionsResponse.cs (1)
22var optionsObject = JsonNode.Parse(value.OptionsJson)?.AsObject()
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (18)
UserJwtsTests.cs (18)
112var appSettings = JsonSerializer.Deserialize<JsonObject>(File.ReadAllText(appsettings)); 115appSettings = JsonSerializer.Deserialize<JsonObject>(File.ReadAllText(appsettings)); 129var appSettings = JsonSerializer.Deserialize<JsonObject>(File.ReadAllText(appsettings)); 132appSettings = JsonSerializer.Deserialize<JsonObject>(File.ReadAllText(appsettings)); 300var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream); 519var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream); 547var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream); 586var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream); 608var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream); 630var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream);
Microsoft.AspNetCore.Identity.Test (10)
Passkeys\PasskeyHandlerAssertionTest.cs (3)
207var response = credentialJson["response"]!.AsObject(); 257var response = credentialJson["response"]!.AsObject(); 324var response = credentialJson["response"]!.AsObject();
Passkeys\PasskeyHandlerAttestationTest.cs (5)
173var user = attestationStateJson["userEntity"]!.AsObject(); 208var user = attestationStateJson["userEntity"]!.AsObject(); 243var user = attestationStateJson["userEntity"]!.AsObject(); 328var response = credentialJson["response"]!.AsObject(); 378var response = credentialJson["response"]!.AsObject();
Passkeys\PasskeyScenarioTest.cs (2)
104public void TransformAsJsonObject(Action<JsonObject> transform) 115var jsonObject = JsonNode.Parse(value)?.AsObject()
Microsoft.AspNetCore.JsonPatch.SystemTextJson (13)
Adapters\AdapterFactory.cs (1)
33JsonObject => new JsonObjectAdapter(),
Internal\JsonObjectAdapter.cs (12)
20var obj = (JsonObject)target; 35var obj = (JsonObject)target; 55var obj = (JsonObject)target; 74var obj = (JsonObject)target; 96var obj = (JsonObject)target; 127var obj = (JsonObject)target;
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (5)
IntegrationTests\AnonymousObjectIntegrationTest.cs (1)
171var doc = new JsonObject
IntegrationTests\HeterogenousCollectionTests.cs (1)
25var circleJObject = JsonObject.Parse(@"{
JsonPatchDocumentJObjectTest.cs (2)
18var model = new ObjectWithJObject { CustomData = (JsonObject)JsonSerializer.SerializeToNode(new { Emails = new[] { "foo@bar.com" } }) }; 34var model = new ObjectWithJObject { CustomData = (JsonObject)JsonSerializer.SerializeToNode(new { Email = "foo@bar.com", Name = "Bar" }) };
TestObjectModels\ObjectWithJObject.cs (1)
10public JsonObject CustomData { get; set; } = new JsonObject();
Microsoft.AspNetCore.OpenApi (9)
Extensions\JsonNodeSchemaExtensions.cs (1)
398var mappings = new JsonObject();
Schemas\OpenApiJsonSchema.Helpers.cs (1)
154var obj = new JsonObject();
Services\Schemas\OpenApiSchemaService.cs (7)
139private static JsonObject CreateSchemaForJsonPatch() 141var addReplaceTest = new JsonObject() 161var moveCopy = new JsonObject() 184var remove = new JsonObject() 463if (node is JsonObject jsonObject) 491var newObject = new JsonObject(); 552if (current is JsonObject currentObject)
Microsoft.AspNetCore.OpenApi.Tests (3)
Extensions\JsonNodeSchemaExtensionsTests.cs (2)
101var schema = new JsonObject(); 139var schema = new JsonObject();
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (1)
860Assert.IsType<JsonObject>(param.Schema.Default);
Microsoft.DotNet.Internal.SymbolHelper (4)
SymbolPromotionHelper.cs (4)
103JsonObject registrationPayload = new() 123JsonObject visibilityPayload = new() 138async Task<bool> SendPostRequestWithRetries(string url, JsonObject payload) 252JsonObject extensionPayload = new()
Microsoft.Extensions.AI (2)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (2)
169}, AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(JsonObject))); 225JsonValueKind.Object => JsonObject.Create(element),
Microsoft.Extensions.AI.Abstractions (29)
Utilities\AIJsonUtilities.cs (1)
174case JsonObject obj:
Utilities\AIJsonUtilities.Defaults.cs (1)
87[JsonSerializable(typeof(JsonObject))]
Utilities\AIJsonUtilities.Schema.Create.cs (23)
89JsonObject parameterSchemas = new(); 233JsonObject? schemaObj = null; 278if (schema is JsonObject objSchema) 315JsonObject obj = ConvertSchemaToObject(ref schema); 395static JsonObject ConvertSchemaToObject(ref JsonNode schema) 397JsonObject obj; 402return (JsonObject)schema; 445JsonObject obj = ConvertSchemaToObject(ref schema); 458JsonObject obj = ConvertSchemaToObject(ref schema); 472JsonObject obj = ConvertSchemaToObject(ref schema); 486JsonObject obj = ConvertSchemaToObject(ref schema); 555schema is JsonObject requiredSchemaObj && 598JsonObject obj = ConvertSchemaToObject(ref schema); 622JsonObject obj = ConvertSchemaToObject(ref schema); 635JsonObject obj = ConvertSchemaToObject(ref schema); 638if (notNode is null or JsonObject) 640JsonObject notObj = 641notNode as JsonObject ?? 642(JsonObject)(obj[NotPropertyName] = new JsonObject()); 657JsonObject obj = ConvertSchemaToObject(ref schema); 702static bool TryGetSchemaType(JsonObject schema, [NotNullWhen(true)] out string? schemaType, out bool isNullable) 768private static bool TypeIsIntegerWithStringNumberHandling(AIJsonSchemaCreateContext ctx, JsonObject schema, [NotNullWhen(true)] out string? numericType, out bool isNullable) 812private static void InsertAtStart(this JsonObject jsonObject, string key, JsonNode value)
Utilities\AIJsonUtilities.Schema.Transform.cs (4)
64JsonObject schemaObj = (JsonObject)schema; 65JsonObject? properties = null; 68if (schemaObj.TryGetPropertyValue(PropertiesPropertyName, out JsonNode? props) && props is JsonObject propsObj)
Microsoft.Extensions.AI.Abstractions.Tests (8)
Contents\FunctionCallContentTests.cs (1)
97var jsonObj = json!.AsObject();
test\Shared\JsonSchemaExporter\TestTypes.cs (2)
105yield return new TestData<JsonObject>(new() { ["x"] = 42 }, """{"type":["object","null"]}"""); 1249[JsonSerializable(typeof(JsonObject))]
Utilities\AIJsonUtilitiesTests.cs (5)
1585var schemaObj = Assert.IsType<JsonObject>(schema); 1600var schemaObj = Assert.IsType<JsonObject>(schema); 1606Assert.Equal(((JsonArray)schemaObj["required"]!).Count, ((JsonObject)props!).Count);
Microsoft.Extensions.AI.Evaluation.Safety (9)
ContentSafetyServicePayloadUtilities.cs (9)
148var payload = 194IEnumerable<JsonObject> userTextListItems = 200var item = new JsonObject(); 230var payload = 274IEnumerable<JsonObject> GetMessages(Dictionary<string, ChatMessage> turn, int turnIndex) 280IEnumerable<JsonObject> contents = GetContents(question); 291IEnumerable<JsonObject> contents = GetContents(answer); 314IEnumerable<JsonObject> GetContents(ChatMessage message) 356var payload =
Microsoft.Extensions.AI.OpenAI (1)
OpenAIClientExtensions.cs (1)
57if (node is JsonObject schemaObj)
Microsoft.ML.AutoML (1)
SweepableEstimator\Converter\SweepableEstimatorConverter.cs (1)
29var jObject = JsonObject.Parse("{}");
Microsoft.ML.AutoML.SourceGenerator (1)
SearchSpaceGenerator.cs (1)
93else if (searchSpaceNode is JsonObject searchSpaceObject && searchSpaceObject.ContainsKey("min"))
Microsoft.ML.GenAI.Mistral (2)
Mistral_7B_0_3ChatTemplateBuilder.cs (1)
125arguments = JsonObject.Parse(tc.FunctionArguments),
MistralCausalLMAgent.cs (1)
140public JsonObject? Arguments { get; set; }
Roslyn.VisualStudio.Next.UnitTests (2)
UnifiedSettings\UnifiedSettingsTests.cs (2)
132var categories = jsonDocument!.Root["categories"]!.AsObject(); 232var categories = jsonDocument!.Root["categories"]!.AsObject();
Shared.Tests (2)
JsonSchemaExporter\TestTypes.cs (2)
105yield return new TestData<JsonObject>(new() { ["x"] = 42 }, """{"type":["object","null"]}"""); 1249[JsonSerializable(typeof(JsonObject))]
System.Text.Json (82)
System\Text\Json\Nodes\JsonArray.cs (2)
102case JsonObject: 393if (Value is JsonObject jsonObject)
System\Text\Json\Nodes\JsonNode.cs (17)
76/// Casts to the derived <see cref="JsonObject"/> type. 79/// A <see cref="JsonObject"/>. 82/// The node is not a <see cref="JsonObject"/>. 84public JsonObject AsObject() 86JsonObject? jObject = this as JsonObject; 90ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonObject)); 120/// A parent can either be a <see cref="JsonObject"/> or a <see cref="JsonArray"/>. 210/// The current <see cref="JsonNode"/> is not a <see cref="JsonArray"/> or <see cref="JsonObject"/>. 220ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonArray), nameof(JsonObject)); 225ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonArray), nameof(JsonObject)); 236/// The current <see cref="JsonNode"/> is not a <see cref="JsonObject"/>. 269/// The current parent is not a <see cref="JsonObject"/>. 273JsonObject? parentObject = _parent as JsonObject; 277ThrowHelper.ThrowInvalidOperationException_NodeParentWrongType(nameof(JsonObject)); 335case JsonObject jsonObject:
System\Text\Json\Nodes\JsonNodeOptions.cs (1)
12/// Specifies whether property names on <see cref="JsonObject"/> are case insensitive.
System\Text\Json\Nodes\JsonObject.cs (13)
14/// It's safe to perform multiple concurrent read operations on a <see cref="JsonObject"/>, 26/// Initializes a new instance of the <see cref="JsonObject"/> class that is empty. 32/// Initializes a new instance of the <see cref="JsonObject"/> class that contains the specified <paramref name="properties"/>. 51/// Initializes a new instance of the <see cref="JsonObject"/> class that contains properties from the specified <see cref="JsonElement"/>. 54/// The new instance of the <see cref="JsonObject"/> class that contains properties from the specified <see cref="JsonElement"/>. 58/// <returns>A <see cref="JsonObject"/>.</returns> 59public static JsonObject? Create(JsonElement element, JsonNodeOptions? options = null) 94var jObject = new JsonObject(Options) 139/// <see langword="true"/> if the <see cref="JsonObject"/> contains an element with the specified property name; otherwise, <see langword="false"/>. 226case JsonObject jsonObject: 340private readonly JsonObject _node; 342public DebugView(JsonObject node) 393if (Value is JsonObject jsonObject)
System\Text\Json\Nodes\JsonObject.IDictionary.cs (28)
16/// Adds an element with the provided property name and value to the <see cref="JsonObject"/>. 24/// An element with the same property name already exists in the <see cref="JsonObject"/>. 35/// Adds an element with the provided name and value to the <see cref="JsonObject"/>, if a property named <paramref name="propertyName"/> doesn't already exist. 46/// Adds an element with the provided name and value to the <see cref="JsonObject"/>, if a property named <paramref name="propertyName"/> doesn't already exist. 50/// <param name="index">The index of the added or existing <paramref name="propertyName"/>. This is always a valid index into the <see cref="JsonObject"/>.</param> 75/// Adds the specified property to the <see cref="JsonObject"/>. 78/// The KeyValuePair structure representing the property name and value to add to the <see cref="JsonObject"/>. 81/// An element with the same property name already exists in the <see cref="JsonObject"/>. 89/// Removes all elements from the <see cref="JsonObject"/>. 110/// Determines whether the <see cref="JsonObject"/> contains an element with the specified property name. 112/// <param name="propertyName">The property name to locate in the <see cref="JsonObject"/>.</param> 114/// <see langword="true"/> if the <see cref="JsonObject"/> contains an element with the specified property name; otherwise, <see langword="false"/>. 127/// Gets the number of elements contained in <see cref="JsonObject"/>. 132/// Removes the element with the specified property name from the <see cref="JsonObject"/>. 155/// Determines whether the <see cref="JsonObject"/> contains a specific property name and <see cref="JsonNode"/> reference. 157/// <param name="item">The element to locate in the <see cref="JsonObject"/>.</param> 159/// <see langword="true"/> if the <see cref="JsonObject"/> contains an element with the property name; otherwise, <see langword="false"/>. 165/// Copies the elements of the <see cref="JsonObject"/> to an array of type KeyValuePair starting at the specified array index. 168/// The one-dimensional Array that is the destination of the elements copied from <see cref="JsonObject"/>. 185/// Returns an enumerator that iterates through the <see cref="JsonObject"/>. 188/// An enumerator that iterates through the <see cref="JsonObject"/>. 193/// Removes a key and value from the <see cref="JsonObject"/>. 196/// The KeyValuePair structure representing the property name and value to remove from the <see cref="JsonObject"/>. 204/// Gets a collection containing the property names in the <see cref="JsonObject"/>. 209/// Gets a collection containing the property values in the <see cref="JsonObject"/>. 222/// <see langword="true"/> if the <see cref="JsonObject"/> contains an element with the specified property name; otherwise, <see langword="false"/>. 240/// Returns an enumerator that iterates through the <see cref="JsonObject"/>. 243/// An enumerator that iterates through the <see cref="JsonObject"/>.
System\Text\Json\Nodes\JsonObject.IList.cs (1)
65/// <exception cref="ArgumentException">An element with the same key already exists in the <see cref="JsonObject"/>.</exception>
System\Text\Json\Schema\JsonSchema.cs (2)
158var objSchema = new JsonObject(); 192var properties = new JsonObject();
System\Text\Json\Serialization\Attributes\JsonExtensionDataAttribute.cs (1)
7/// When placed on a property or field of type <see cref="System.Text.Json.Nodes.JsonObject"/>,
System\Text\Json\Serialization\Converters\Node\JsonNodeConverterFactory.cs (1)
23if (typeof(JsonObject) == typeToConvert)
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (10)
11internal sealed class JsonObjectConverter : JsonConverter<JsonObject?> 28Debug.Assert(obj is JsonObject); 29JsonObject jObject = (JsonObject)obj; 44internal override void WriteExtensionDataValue(Utf8JsonWriter writer, JsonObject? value, JsonSerializerOptions options) 50public override void Write(Utf8JsonWriter writer, JsonObject? value, JsonSerializerOptions options) 61public override JsonObject? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 76internal static JsonObject ReadAsJsonElement(ref Utf8JsonReader reader, JsonNodeOptions options) 82internal static JsonObject ReadAsJsonNode(ref Utf8JsonReader reader, JsonNodeOptions options) 86JsonObject jObject = new JsonObject(options);
System\Text\Json\Serialization\JsonConverterOfT.cs (1)
462Debug.Assert(Type == typeof(Nodes.JsonObject));
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (1)
422if (jsonNode is JsonObject jsonObject)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (3)
150/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="JsonObject"/> values. 153public static JsonConverter<JsonObject?> JsonObjectConverter => s_jsonObjectConverter ??= new JsonObjectConverter(); 154private static JsonConverter<JsonObject?>? s_jsonObjectConverter;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
875Debug.Assert(propValue is Nodes.JsonObject);
System.Windows.Forms.Analyzers.Tests (2)
CurrentReferences.cs (2)
142JsonObject? jsonObject = JsonNode.Parse(globalJsonString)?.AsObject(); 155JsonObject? jsonObject = JsonNode.Parse(configJsonString)?.AsObject();
TestProject.AppHost (3)
TestProgram.cs (3)
172var root = new JsonObject(); 175var projectJson = new JsonObject(); 189var endpointJsonObject = new JsonObject