253 instantiations of JsonObject
aspire (25)
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (4)
193config = JsonNode.Parse(existingContent)?.AsObject() ?? new JsonObject(); 197config = new JsonObject(); 203config["mcpServers"] = new JsonObject(); 209servers[AspireServerName] = new JsonObject
Agents\CopilotCli\CopilotCliAgentEnvironmentScanner.cs (5)
186config = JsonNode.Parse(existingContent)?.AsObject() ?? new JsonObject(); 190config = new JsonObject(); 196config["mcpServers"] = new JsonObject(); 202servers[AspireServerName] = new JsonObject 207["env"] = new JsonObject
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (4)
177config = JsonNode.Parse(jsonContent)?.AsObject() ?? new JsonObject(); 181config = new JsonObject 190config["mcp"] = new JsonObject(); 196mcp[AspireServerName] = new JsonObject
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (4)
232config = JsonNode.Parse(existingContent)?.AsObject() ?? new JsonObject(); 236config = new JsonObject(); 242config["servers"] = new JsonObject(); 248servers["aspire"] = new JsonObject
Configuration\ConfigurationService.cs (3)
23settings = JsonNode.Parse(existingContent)?.AsObject() ?? new JsonObject(); 27settings = new JsonObject(); 161currentObject[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();
Aspire.Cli.Tests (40)
Agents\CopilotCliAgentEnvironmentScannerTests.cs (9)
107var existingConfig = new JsonObject 109["mcpServers"] = new JsonObject 111["other-server"] = new JsonObject 147var existingConfig = new JsonObject 149["mcpServers"] = new JsonObject 151["aspire"] = new JsonObject 193var existingConfig = new JsonObject 195["mcpServers"] = new JsonObject 197["aspire"] = new JsonObject
Agents\VsCodeAgentEnvironmentScannerTests.cs (6)
166var existingConfig = new JsonObject 168["servers"] = new JsonObject 170["other-server"] = new JsonObject 207var existingConfig = new JsonObject 209["servers"] = new JsonObject 211["other-server"] = new JsonObject
Projects\ProjectUpdaterTests.cs (25)
70var itemsAndProperties = new JsonObject(); 181var itemsAndProperties = new JsonObject(); 319var itemsAndProperties = new JsonObject(); 462var itemsAndProperties = new JsonObject(); 623var itemsAndProperties = new JsonObject(); 741var itemsAndProperties = new JsonObject(); 843var itemsAndProperties = new JsonObject(); 976var itemsAndProperties = new JsonObject(); 1093var itemsAndProperties = new JsonObject(); 1213var itemsAndProperties = new JsonObject(); 1326var itemsAndProperties = new JsonObject(); 1693var itemsAndProperties = new JsonObject(); 1775var itemsAndProperties = new JsonObject(); 1858var itemsAndProperties = new JsonObject(); 1939var itemsAndProperties = new JsonObject(); 2028var itemsAndProperties = new JsonObject(); 2107var itemsAndProperties = new JsonObject(); 2187var itemsAndProperties = new JsonObject(); 2314var itemsAndProperties = new JsonObject(); 2556JsonObject properties = new JsonObject(); 2568JsonObject items = new JsonObject(); 2596JsonObject newPackageReference = new JsonObject 2612JsonObject newPackageReference = new JsonObject 2628JsonObject newProjectReference = new JsonObject 2639JsonObject properties = new JsonObject();
Aspire.Dashboard (2)
Model\GenAI\GenAIItemPartViewModel.cs (1)
89var jsonObject = new JsonObject();
Otlp\Model\OtlpHelpers.cs (1)
150var o = 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 (4)
Pipelines\Internal\JsonFlattener.cs (3)
21var result = new JsonObject(); 34var result = new JsonObject(); 46var newObject = new JsonObject();
UserSecrets\UserSecretsManagerFactory.cs (1)
177var 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)
1307var 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.Tests (21)
JsonFlattenerTests.cs (20)
15var userSecrets = new JsonObject 18["Azure"] = new JsonObject 21["Deployments"] = new JsonObject 23["MyStorage"] = new JsonObject 49var userSecrets = new JsonObject 70var userSecrets = new JsonObject(); 83var userSecrets = new JsonObject 85["Level1"] = new JsonObject 87["Level2"] = new JsonObject 89["Level3"] = new JsonObject 109var userSecrets = new JsonObject 115["Nested"] = new JsonObject 138var userSecrets = new JsonObject 167var userSecrets = new JsonObject 170new JsonObject { ["Name"] = "Item1", ["Value"] = "Value1" }, 171new JsonObject { ["Name"] = "Item2", ["Value"] = "Value2" } 173["NestedConfig"] = new JsonObject 176new JsonObject 179["Settings"] = new JsonObject { ["Enabled"] = true } 202var userSecrets = new JsonObject
Publishing\DeploymentStateManagerTests.cs (1)
207var 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();
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 (7)
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)
393var mappings = new JsonObject();
Schemas\OpenApiJsonSchema.Helpers.cs (1)
154var obj = new JsonObject();
Services\Schemas\OpenApiSchemaService.cs (21)
65schema = new JsonObject 74schema = new JsonObject 77[OpenApiSchemaKeywords.ItemsKeyword] = new JsonObject 94schema = new JsonObject(); 142var addReplaceTest = new JsonObject() 147[OpenApiSchemaKeywords.PropertiesKeyword] = new JsonObject 149["op"] = new JsonObject() 154["path"] = new JsonObject() 158["value"] = new JsonObject() 162var moveCopy = new JsonObject() 167[OpenApiSchemaKeywords.PropertiesKeyword] = new JsonObject 169["op"] = new JsonObject() 174["path"] = new JsonObject() 178["from"] = new JsonObject() 185var remove = new JsonObject() 190[OpenApiSchemaKeywords.PropertiesKeyword] = new JsonObject 192["op"] = new JsonObject() 197["path"] = new JsonObject() 204return new JsonObject 208[OpenApiSchemaKeywords.ItemsKeyword] = new JsonObject 510var 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)
86JsonObject parameterSchemas = new(); 134JsonNode schema = new JsonObject(); 245return schemaObj ?? new JsonObject(); 250return new JsonObject { [TypePropertyName] = null }; 295objSchema.Add(ItemsPropertyName, new JsonObject()); 381schema = obj = new() { [NotPropertyName] = true }; 573(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()); 73return new JsonObject(jElement, options); 80JsonObject jObject = new JsonObject(options);
TestProject.AppHost (3)
TestProgram.cs (3)
172var root = new JsonObject(); 175var projectJson = new JsonObject(); 189var endpointJsonObject = new JsonObject
500 references to JsonObject
aspire (47)
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (5)
150var config = JsonNode.Parse(content)?.AsObject(); 157if (config.TryGetPropertyValue("mcpServers", out var serversNode) && serversNode is JsonObject servers) 187JsonObject config; 201if (!config.ContainsKey("mcpServers") || config["mcpServers"] is not JsonObject) 206var servers = config["mcpServers"]!.AsObject();
Agents\CopilotCli\CopilotCliAgentEnvironmentScanner.cs (5)
132var config = JsonNode.Parse(content)?.AsObject(); 139if (config.TryGetPropertyValue("mcpServers", out var serversNode) && serversNode is JsonObject servers) 180JsonObject config; 194if (!config.ContainsKey("mcpServers") || config["mcpServers"] is not JsonObject) 199var servers = config["mcpServers"]!.AsObject();
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (5)
97var config = JsonNode.Parse(content)?.AsObject(); 104if (config.TryGetPropertyValue("mcp", out var mcpNode) && mcpNode is JsonObject mcp) 168JsonObject config; 188if (!config.ContainsKey("mcp") || config["mcp"] is not JsonObject) 193var mcp = config["mcp"]!.AsObject();
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (5)
183var config = JsonNode.Parse(content)?.AsObject(); 190if (config.TryGetPropertyValue("servers", out var serversNode) && serversNode is JsonObject servers) 226JsonObject config; 240if (!config.ContainsKey("servers") || config["servers"] is not JsonObject) 245var servers = config["servers"]!.AsObject();
Configuration\ConfigurationService.cs (12)
17JsonObject settings; 57var settings = JsonNode.Parse(existingContent)?.AsObject(); 131var settings = JsonNode.Parse(content)?.AsObject(); 148private static void SetNestedValue(JsonObject settings, string key, string value) 151var currentObject = settings; 159if (!currentObject.ContainsKey(part) || currentObject[part] is not JsonObject) 176private static bool DeleteNestedValue(JsonObject settings, string key) 179var currentObject = settings; 180var objectPath = new List<(JsonObject obj, string key)>(); 188if (!currentObject.ContainsKey(part) || currentObject[part] is not JsonObject) 230private static void FlattenJsonObject(JsonObject obj, Dictionary<string, string> result, string prefix) 236if (kvp.Value is JsonObject nestedObj)
JsonSourceGenerationContext.cs (1)
12[JsonSerializable(typeof(JsonObject))]
JsonSourceGenerationContext.GetJsonTypeInfo.g.cs (1)
38if (type == typeof(global::System.Text.Json.Nodes.JsonObject))
JsonSourceGenerationContext.JsonObject.g.cs (8)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Text.Json.Nodes.JsonObject>? _JsonObject; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Text.Json.Nodes.JsonObject> JsonObject 22get => _JsonObject ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Text.Json.Nodes.JsonObject>)Options.GetTypeInfo(typeof(global::System.Text.Json.Nodes.JsonObject)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Text.Json.Nodes.JsonObject> Create_JsonObject(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Text.Json.Nodes.JsonObject>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Text.Json.Nodes.JsonObject> jsonTypeInfo)) 29jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::System.Text.Json.Nodes.JsonObject>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.JsonObjectConverter);
Projects\FallbackProjectParser.cs (5)
121var rootObject = new JsonObject(); 124var itemsObject = new JsonObject(); 130var packageObj = new JsonObject(); 141var projectObj = new JsonObject(); 151var propertiesObject = new JsonObject();
Aspire.Cli.Tests (72)
Agents\CopilotCliAgentEnvironmentScannerTests.cs (9)
68var config = JsonNode.Parse(content)?.AsObject(); 72var servers = config["mcpServers"]?.AsObject(); 76var aspireServer = servers["aspire"]?.AsObject(); 88var env = aspireServer["env"]?.AsObject(); 107var existingConfig = new JsonObject 129var config = JsonNode.Parse(content)?.AsObject(); 132var servers = config["mcpServers"]?.AsObject(); 147var existingConfig = new JsonObject 193var existingConfig = new JsonObject
Agents\VsCodeAgentEnvironmentScannerTests.cs (10)
136var config = JsonNode.Parse(content)?.AsObject(); 140var servers = config["servers"]?.AsObject(); 144var aspireServer = servers["aspire"]?.AsObject(); 166var existingConfig = new JsonObject 189var config = JsonNode.Parse(content)?.AsObject(); 192var servers = config["servers"]?.AsObject(); 207var existingConfig = new JsonObject 234var config = JsonNode.Parse(content)?.AsObject(); 235var aspireServer = config?["servers"]?["aspire"]?.AsObject(); 242var otherServer = config?["servers"]?["other-server"]?.AsObject();
Commands\ConfigCommandTests.cs (13)
74var settings = JsonNode.Parse(json)?.AsObject(); 97var settings = JsonNode.Parse(json)?.AsObject(); 99Assert.True(settings["foo"] is JsonObject); 100var fooObject = settings["foo"]!.AsObject(); 122var settings = JsonNode.Parse(json)?.AsObject(); 125Assert.True(settings["foo"] is JsonObject); 126var fooObject = settings["foo"]!.AsObject(); 127Assert.True(fooObject["bar"] is JsonObject); 128var barObject = fooObject["bar"]!.AsObject(); 154var settings = JsonNode.Parse(json)?.AsObject(); 157Assert.True(settings["foo"] is JsonObject); 158var fooObject = settings["foo"]!.AsObject(); 274var settings = JsonNode.Parse(json)?.AsObject();
Projects\ProjectUpdaterTests.cs (40)
70var itemsAndProperties = new JsonObject(); 181var itemsAndProperties = new JsonObject(); 319var itemsAndProperties = new JsonObject(); 462var itemsAndProperties = new JsonObject(); 623var itemsAndProperties = new JsonObject(); 741var itemsAndProperties = new JsonObject(); 843var itemsAndProperties = new JsonObject(); 976var itemsAndProperties = new JsonObject(); 1093var itemsAndProperties = new JsonObject(); 1213var itemsAndProperties = new JsonObject(); 1326var itemsAndProperties = new JsonObject(); 1693var itemsAndProperties = new JsonObject(); 1775var itemsAndProperties = new JsonObject(); 1858var itemsAndProperties = new JsonObject(); 1939var itemsAndProperties = new JsonObject(); 2028var itemsAndProperties = new JsonObject(); 2107var itemsAndProperties = new JsonObject(); 2187var itemsAndProperties = new JsonObject(); 2314var itemsAndProperties = new JsonObject(); 2552public static JsonObject WithSdkVersion(this JsonObject root, string sdkVersion) 2556JsonObject properties = new JsonObject(); 2566public static JsonObject WithMSBuildOutput(this JsonObject root) 2568JsonObject items = new JsonObject(); 2590public static JsonObject WithPackageReference(this JsonObject root, string packageId, string packageVersion) 2593var items = root["Items"]!.AsObject(); 2596JsonObject newPackageReference = new JsonObject 2606public static JsonObject WithPackageReferenceWithoutVersion(this JsonObject root, string packageId) 2609var items = root["Items"]!.AsObject(); 2612JsonObject newPackageReference = new JsonObject 2622public static JsonObject WithProjectReference(this JsonObject root, string fullPath) 2625var items = root["Items"]!.AsObject(); 2628JsonObject newProjectReference = new JsonObject 2637public static JsonObject WithProperty(this JsonObject root, string propertyName, string propertyValue) 2639JsonObject properties = new JsonObject();
Aspire.Dashboard (10)
Model\GenAI\GenAIItemPartViewModel.cs (3)
69JsonObject obj when obj.Count == 0 => string.Empty, 87private static JsonObject ToJsonObject(Dictionary<string, JsonElement> dict) 89var jsonObject = new JsonObject();
Model\GenAI\GenAIVisualizerDialogViewModel.cs (5)
91if (item is not JsonObject obj) 104if (obj["parameters"] is JsonObject paramsObj) 541private static OpenApiSchema? ParseOpenApiSchema(JsonObject schemaObj) 550if (schemaObj["properties"] is JsonObject propsObj) 555if (prop.Value is JsonObject propSchemaObj)
Otlp\Model\OtlpHelpers.cs (2)
148static JsonObject ConvertKeyValues(KeyValueList value) 150var o = new JsonObject();
Aspire.Dashboard.Tests (2)
Integration\OtlpGrpcServiceTests.cs (1)
164var configJson = new JsonObject
Integration\StartupTests.cs (1)
634var configJson = new JsonObject
Aspire.Hosting (53)
Dashboard\DashboardEventHandlers.cs (3)
149var configJson = JsonNode.Parse(configText)?.AsObject(); 241var configJson = JsonNode.Parse(originalConfigText)?.AsObject(); 895public JsonObject? State { get; set; }
DashboardLogMessageContext.DashboardLogMessage.g.cs (2)
162var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Text.Json.Nodes.JsonObject> 179properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Text.Json.Nodes.JsonObject>(options, info6);
DashboardLogMessageContext.GetJsonTypeInfo.g.cs (1)
30if (type == typeof(global::System.Text.Json.Nodes.JsonObject))
DashboardLogMessageContext.JsonObject.g.cs (8)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Text.Json.Nodes.JsonObject>? _JsonObject; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Text.Json.Nodes.JsonObject> JsonObject 20get => _JsonObject ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Text.Json.Nodes.JsonObject>)Options.GetTypeInfo(typeof(global::System.Text.Json.Nodes.JsonObject)); 23private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Text.Json.Nodes.JsonObject> Create_JsonObject(global::System.Text.Json.JsonSerializerOptions options) 25if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Text.Json.Nodes.JsonObject>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Text.Json.Nodes.JsonObject> jsonTypeInfo)) 27jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::System.Text.Json.Nodes.JsonObject>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.JsonObjectConverter);
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 (7)
46private JsonObject? _state; 62protected abstract Task SaveStateToStorageAsync(JsonObject state, CancellationToken cancellationToken); 69protected async Task<JsonObject> LoadStateAsync(CancellationToken cancellationToken = default) 90var flattenedState = JsonNode.Parse(fileContent, documentOptions: jsonDocumentOptions)!.AsObject(); 108public async Task SaveStateAsync(JsonObject state, CancellationToken cancellationToken = default) 145var sectionData = _state?.TryGetPropertyValue(sectionName, out var sectionNode) == true && sectionNode is JsonObject obj
Pipelines\Internal\FileDeploymentStateManager.cs (2)
49protected override async Task SaveStateToStorageAsync(JsonObject state, CancellationToken cancellationToken) 66var 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)
37protected override async Task SaveStateToStorageAsync(JsonObject state, CancellationToken cancellationToken)
UserSecrets\IUserSecretsManager.cs (1)
43Task SaveStateAsync(JsonObject state, CancellationToken cancellationToken = default);
UserSecrets\NoopUserSecretsManager.cs (1)
38public Task SaveStateAsync(JsonObject state, CancellationToken cancellationToken = default)
UserSecrets\UserSecretsManagerFactory.cs (3)
138public async Task SaveStateAsync(JsonObject state, CancellationToken cancellationToken = default) 143var flattenedState = JsonFlattener.FlattenJsonObject(state); 177var contents = new JsonObject();
Aspire.Hosting.Azure (16)
AzureBicepResource.cs (4)
385if (JsonNode.Parse(responseContent) is JsonObject responseObj) 387if (responseObj["error"] is JsonObject errorObj) 407if (responseObj["properties"]?["error"] is JsonObject deploymentErrorObj) 430if (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)
164var 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)
1307var 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.Tests (22)
JsonFlattenerTests.cs (16)
15var userSecrets = new JsonObject 33var result = JsonFlattener.FlattenJsonObject(userSecrets); 49var userSecrets = new JsonObject 57var result = JsonFlattener.FlattenJsonObject(userSecrets); 70var userSecrets = new JsonObject(); 73var result = JsonFlattener.FlattenJsonObject(userSecrets); 83var userSecrets = new JsonObject 98var result = JsonFlattener.FlattenJsonObject(userSecrets); 109var userSecrets = new JsonObject 123var result = JsonFlattener.FlattenJsonObject(userSecrets); 138var userSecrets = new JsonObject 146var result = JsonFlattener.FlattenJsonObject(userSecrets); 167var userSecrets = new JsonObject 186var result = JsonFlattener.FlattenJsonObject(userSecrets); 202var userSecrets = new JsonObject 209var result = JsonFlattener.FlattenJsonObject(userSecrets);
Orchestrator\ParameterProcessorTests.cs (5)
984private readonly JsonObject _unflattenedState = []; 985private JsonObject? _flattenedState; 988public JsonObject State => _flattenedState ?? []; 994var sectionData = _unflattenedState.TryGetPropertyValue(sectionName, out var sectionNode) && sectionNode is JsonObject obj
Publishing\DeploymentStateManagerTests.cs (1)
207var state = new JsonObject
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();
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) 744case JsonObject obj: 748obj.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 (4)
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)
393var mappings = new JsonObject();
Schemas\OpenApiJsonSchema.Helpers.cs (1)
154var obj = new JsonObject();
Services\Schemas\OpenApiSchemaService.cs (7)
140private static JsonObject CreateSchemaForJsonPatch() 142var addReplaceTest = new JsonObject() 162var moveCopy = new JsonObject() 185var remove = new JsonObject() 482if (node is JsonObject jsonObject) 510var newObject = new JsonObject(); 571if (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 (28)
Utilities\AIJsonUtilities.cs (1)
174case JsonObject obj:
Utilities\AIJsonUtilities.Defaults.cs (1)
85[JsonSerializable(typeof(JsonObject))]
Utilities\AIJsonUtilities.Schema.Create.cs (22)
86JsonObject parameterSchemas = new(); 224JsonObject? schemaObj = null; 269if (schema is JsonObject objSchema) 306JsonObject obj = ConvertSchemaToObject(ref schema); 371static JsonObject ConvertSchemaToObject(ref JsonNode schema) 373JsonObject obj; 378return (JsonObject)schema; 416JsonObject obj = ConvertSchemaToObject(ref schema); 428JsonObject obj = ConvertSchemaToObject(ref schema); 441JsonObject obj = ConvertSchemaToObject(ref schema); 454JsonObject obj = ConvertSchemaToObject(ref schema); 530JsonObject obj = ConvertSchemaToObject(ref schema); 554JsonObject obj = ConvertSchemaToObject(ref schema); 566JsonObject obj = ConvertSchemaToObject(ref schema); 569if (notNode is null or JsonObject) 571JsonObject notObj = 572notNode as JsonObject ?? 573(JsonObject)(obj[NotPropertyName] = new JsonObject()); 601JsonObject obj = ConvertSchemaToObject(ref schema); 632static bool TryGetSchemaType(JsonObject schema, [NotNullWhen(true)] out string? schemaType, out bool isNullable) 698private static bool TypeIsIntegerWithStringNumberHandling(AIJsonSchemaCreateContext ctx, JsonObject schema, [NotNullWhen(true)] out string? numericType, out bool isNullable) 742private 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 (7)
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)
1469var schemaObj = Assert.IsType<JsonObject>(schema); 1484var schemaObj = Assert.IsType<JsonObject>(schema); 1490Assert.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)
51if (node is JsonObject schemaObj)
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIResponseClientTests.cs (2)
3700JsonObject rcoJsonObject = Assert.IsType<JsonObject>(JsonNode.Parse(rcoJsonBinaryData.ToMemory().Span));
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 (81)
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"/>. 205case JsonObject jsonObject: 319private readonly JsonObject _node; 321public DebugView(JsonObject node) 372if (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 (9)
11internal sealed class JsonObjectConverter : JsonConverter<JsonObject?> 28Debug.Assert(obj is JsonObject); 29JsonObject jObject = (JsonObject)obj; 44public override void Write(Utf8JsonWriter writer, JsonObject? value, JsonSerializerOptions options) 55public override JsonObject? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 70internal static JsonObject ReadAsJsonElement(ref Utf8JsonReader reader, JsonNodeOptions options) 76internal static JsonObject ReadAsJsonNode(ref Utf8JsonReader reader, JsonNodeOptions options) 80JsonObject jObject = new JsonObject(options);
System\Text\Json\Serialization\JsonConverterOfT.cs (1)
461Debug.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