125 instantiations of JsonObject
Aspire.Dashboard (1)
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)
547var configJson = new JsonObject 549["Logging"] = new JsonObject 551["LogLevel"] = new JsonObject
Aspire.Hosting (1)
src\Shared\SecretsStore.cs (1)
54var contents = new JsonObject();
Aspire.Hosting.Azure (4)
Provisioning\JsonExtensions.cs (1)
18node = new JsonObject();
Provisioning\Provisioners\BicepProvisioner.cs (3)
184var parameters = new JsonObject(); 186var scope = new JsonObject(); 469parameters[parameter.Key] = new JsonObject()
Aspire.Hosting.Azure.Tests (22)
AzureBicepProvisionerTests.cs (19)
24var parameters = new JsonObject(); 55.WithParameter("jsonObj", new JsonObject { ["key"] = "value" }) 60var parameters = new JsonObject(); 103.WithParameter("jsonObj", new JsonObject { ["key"] = "value" }); 109.WithParameter("jsonObj", new JsonObject { ["key"] = "value" }); 111var parameters0 = new JsonObject(); 115var parameters1 = new JsonObject(); 166.WithParameter("jsonObj", new JsonObject { ["key"] = "value" }); 168var parameters0 = new JsonObject(); 172var parameters1 = new JsonObject(); 194var parameters0 = new JsonObject(); 220var parameters0 = new JsonObject(); 221var scope0 = new JsonObject(); 226var parameters1 = new JsonObject(); 227var scope1 = new JsonObject(); 248var parameters0 = new JsonObject(); 249var scope0 = new JsonObject(); 254var parameters1 = new JsonObject(); 255var scope1 = new JsonObject();
AzureBicepResourceTests.cs (1)
181.WithParameter("param3", new JsonObject() { ["value"] = "nested" })
AzureEventHubsExtensionsTests.cs (1)
398document["UserConfig"]!["LoggingConfig"] = new JsonObject { ["Type"] = "Console" };
AzureServiceBusExtensionsTests.cs (1)
509document["UserConfig"]!["Logging"] = new JsonObject { ["Type"] = "Console" };
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 (6)
Extensions\JsonNodeSchemaExtensions.cs (1)
378var mappings = new JsonObject();
Schemas\OpenApiJsonSchema.Helpers.cs (1)
156var obj = new JsonObject();
Services\Schemas\OpenApiSchemaService.cs (4)
66schema = new JsonObject 75schema = new JsonObject 78[OpenApiSchemaKeywords.ItemsKeyword] = new JsonObject 91schema = 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)
183schema = JsonSerializer.SerializeToElement(new JsonObject 187{ "properties", new JsonObject { { "data", JsonElementToJsonNode(schemaElement) } } },
Microsoft.Extensions.AI.Abstractions (9)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (2)
334var objSchema = new JsonObject(); 383var properties = new JsonObject();
Utilities\AIJsonUtilities.Schema.Create.cs (5)
73JsonObject parameterSchemas = new(); 114JsonNode schema = new JsonObject(); 230return schemaObj ?? new JsonObject(); 235return new JsonObject { [TypePropertyName] = null }; 339schema = obj = new() { [NotPropertyName] = true };
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)
108yield return new TestData<JsonObject>(new() { ["x"] = 42 }, """{"type":["object","null"]}""");
Utilities\AIJsonUtilitiesTests.cs (1)
247? new JsonObject
Microsoft.Extensions.AI.Evaluation.Safety (13)
ContentSafetyServicePayloadUtilities.cs (13)
151new JsonObject 204var item = new JsonObject(); 235new JsonObject 286yield return new JsonObject 301yield return new JsonObject 310yield return new JsonObject 326yield return new JsonObject 334yield return new JsonObject 338new JsonObject 346yield return new JsonObject 350new JsonObject 361new JsonObject 366new JsonObject
MSBuild (10)
JsonOutputFormatter.cs (9)
21private readonly JsonNode _topLevelNode = new JsonObject(); 37JsonNode propertiesNode = new JsonObject(); 55JsonNode itemsNode = new JsonObject(); 61JsonObject jsonItem = new(); 91JsonObject itemsNode = new(); 97JsonObject jsonItem = new(); 132JsonObject targetResultsNode = new(); 136JsonObject targetResults = new(); 141JsonObject jsonItem = new();
XMake.cs (1)
4696var jsonNode = new JsonObject();
ServiceBus.AppHost (1)
Program.cs (1)
36document["UserConfig"]!["Logging"] = new JsonObject { ["Type"] = "Console" };
Shared (2)
JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (2)
334var objSchema = new JsonObject(); 383var properties = new JsonObject();
Shared.Tests (1)
JsonSchemaExporter\TestTypes.cs (1)
108yield return new TestData<JsonObject>(new() { ["x"] = 42 }, """{"type":["object","null"]}""");
Stress.ApiService (1)
Program.cs (1)
234var jsonWithUrl = new JsonObject
System.Text.Json (10)
System\Text\Json\Nodes\JsonObject.cs (4)
69JsonValueKind.Object => new JsonObject(element, options), 95? new JsonObject(jsonElement.Value.Clone(), Options) 96: new JsonObject(Options); 99var 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()); 80return new JsonObject(jElement, options); 87JsonObject jObject = new JsonObject(options);
TestProject.AppHost (3)
TestProgram.cs (3)
160var root = new JsonObject(); 163var projectJson = new JsonObject(); 177var endpointJsonObject = new JsonObject
263 references to JsonObject
Aspire.Dashboard (2)
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)
547var configJson = new JsonObject
Aspire.Hosting (10)
Dashboard\DashboardLifecycleHook.cs (1)
490public JsonObject? State { get; set; }
Devcontainers\DevcontainerSettingsWriter.cs (8)
69var settings = (JsonObject)JsonObject.Parse(settingsContent)!; 71JsonObject? portsAttributes; 79portsAttributes = (JsonObject)portsAttributesNode!; 95let attrs = props.Value as JsonObject 110JsonObject? portAttributes; 118portAttributes = (JsonObject)portAttributeNode!;
src\Shared\SecretsStore.cs (1)
54var contents = new JsonObject();
Aspire.Hosting.Azure (18)
Provisioning\Provisioners\AzureProvisioner.cs (6)
180private static async Task<JsonObject> GetUserSecretsAsync(string? userSecretsPath, CancellationToken cancellationToken) 188var userSecrets = userSecretsPath is not null && File.Exists(userSecretsPath) 212var userSecretsLazy = new Lazy<Task<JsonObject>>(() => GetUserSecretsAsync(userSecretsPath, cancellationToken)); 234var userSecrets = await userSecretsLazy.Value.ConfigureAwait(false); 362private async Task<ProvisioningContext> GetProvisioningContextAsync(TokenCredentialHolder holder, Lazy<Task<JsonObject>> userSecretsLazy, CancellationToken cancellationToken) 402var userSecrets = await userSecretsLazy.Value.ConfigureAwait(false);
Provisioning\Provisioners\AzureResourceProvisionerOfT.cs (2)
27JsonObject userSecrets) 37public JsonObject UserSecrets => userSecrets;
Provisioning\Provisioners\BicepProvisioner.cs (10)
184var parameters = new JsonObject(); 186var scope = new JsonObject(); 243var outputObj = outputs?.ToObjectFromJson<JsonObject>(); 388internal static string GetChecksum(AzureBicepResource resource, JsonObject parameters, JsonObject? scope) 416var parameters = JsonNode.Parse(jsonString)?.AsObject(); 417var scope = section["Scope"] is string scopeString 455internal static async Task SetParametersAsync(JsonObject parameters, AzureBicepResource resource, bool skipDynamicValues = false, CancellationToken cancellationToken = default) 487internal static async Task SetScopeAsync(JsonObject scope, AzureBicepResource resource, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.Tests (15)
AzureBicepProvisionerTests.cs (15)
24var parameters = new JsonObject(); 60var parameters = new JsonObject(); 111var parameters0 = new JsonObject(); 115var parameters1 = new JsonObject(); 168var parameters0 = new JsonObject(); 172var parameters1 = new JsonObject(); 194var parameters0 = new JsonObject(); 220var parameters0 = new JsonObject(); 221var scope0 = new JsonObject(); 226var parameters1 = new JsonObject(); 227var scope1 = new JsonObject(); 248var parameters0 = new JsonObject(); 249var scope0 = new JsonObject(); 254var parameters1 = new JsonObject(); 255var scope1 = 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);
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.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 (2)
Extensions\JsonNodeSchemaExtensions.cs (1)
378var mappings = new JsonObject();
Schemas\OpenApiJsonSchema.Helpers.cs (1)
156var obj = new JsonObject();
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (1)
775Assert.IsType<JsonObject>(param.Schema.Default);
Microsoft.Build.BuildCheck.UnitTests (3)
EndToEndTests.cs (3)
152private readonly record struct EmbedResourceTestOutput(String LogOutput, JsonObject DepsJsonResources); 179JsonNode? depsJson = JsonObject.Parse(File.ReadAllText(depsFiles[0])); 183var resources = depsJson!["targets"]?.AsObject().First().Value?[$"{referencedProjectName}/1.0.0"]?["resources"]?.AsObject();
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)
190}, AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(JsonObject))); 250JsonValueKind.Object => JsonObject.Create(element),
Microsoft.Extensions.AI.Abstractions (18)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (1)
632[typeof(JsonObject)] = _ => new JsonSchema { Type = JsonSchemaType.Object },
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (2)
334var objSchema = new JsonObject(); 383var properties = new JsonObject();
Utilities\AIJsonUtilities.cs (1)
177case JsonObject obj:
Utilities\AIJsonUtilities.Defaults.cs (1)
88[JsonSerializable(typeof(JsonObject))]
Utilities\AIJsonUtilities.Schema.Create.cs (9)
73JsonObject parameterSchemas = new(); 209JsonObject? schemaObj = null; 254if (schema is JsonObject objSchema) 297JsonObject obj = ConvertSchemaToObject(ref schema); 329static JsonObject ConvertSchemaToObject(ref JsonNode schema) 331JsonObject obj; 336return (JsonObject)schema; 351private static bool TypeIsIntegerWithStringNumberHandling(AIJsonSchemaCreateContext ctx, JsonObject schema, [NotNullWhen(true)] out string? numericType) 382private 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)
108yield return new TestData<JsonObject>(new() { ["x"] = 42 }, """{"type":["object","null"]}"""); 1237[JsonSerializable(typeof(JsonObject))]
Utilities\AIJsonUtilitiesTests.cs (5)
803var schemaObj = Assert.IsType<JsonObject>(schema); 818var schemaObj = Assert.IsType<JsonObject>(schema); 824Assert.Equal(((JsonArray)schemaObj["required"]!).Count, ((JsonObject)props!).Count);
Microsoft.Extensions.AI.Evaluation.Safety (9)
ContentSafetyServicePayloadUtilities.cs (9)
150var payload = 198IEnumerable<JsonObject> userTextListItems = 204var item = new JsonObject(); 234var payload = 278IEnumerable<JsonObject> GetMessages(Dictionary<string, ChatMessage> turn, int turnIndex) 284IEnumerable<JsonObject> contents = GetContents(question); 295IEnumerable<JsonObject> contents = GetContents(answer); 318IEnumerable<JsonObject> GetContents(ChatMessage message) 360var payload =
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; }
MSBuild (7)
JsonOutputFormatter.cs (6)
61JsonObject jsonItem = new(); 91JsonObject itemsNode = new(); 97JsonObject jsonItem = new(); 132JsonObject targetResultsNode = new(); 136JsonObject targetResults = new(); 141JsonObject jsonItem = new();
XMake.cs (1)
4696var jsonNode = new JsonObject();
Roslyn.VisualStudio.Next.UnitTests (2)
UnifiedSettings\UnifiedSettingsTests.cs (2)
132var categories = jsonDocument!.Root["categories"]!.AsObject(); 233var categories = jsonDocument!.Root["categories"]!.AsObject();
Shared (3)
JsonSchemaExporter\JsonSchemaExporter.cs (1)
632[typeof(JsonObject)] = _ => new JsonSchema { Type = JsonSchemaType.Object },
JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (2)
334var objSchema = new JsonObject(); 383var properties = new JsonObject();
Shared.Tests (3)
JsonSchemaExporter\JsonSchemaExporterTests.cs (1)
127Assert.False(schema is JsonObject jObj && jObj.ContainsKey("type"));
JsonSchemaExporter\TestTypes.cs (2)
108yield return new TestData<JsonObject>(new() { ["x"] = 42 }, """{"type":["object","null"]}"""); 1237[JsonSerializable(typeof(JsonObject))]
System.Text.Json (77)
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 (12)
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"/>. 56/// Initializes a new instance of the <see cref="JsonObject"/> class that contains properties from the specified <see cref="JsonElement"/>. 59/// The new instance of the <see cref="JsonObject"/> class that contains properties from the specified <see cref="JsonElement"/>. 63/// <returns>A <see cref="JsonObject"/>.</returns> 64public static JsonObject? Create(JsonElement element, JsonNodeOptions? options = null) 99var jObject = new JsonObject(Options) 178case JsonObject jsonObject: 295private readonly JsonObject _node; 297public DebugView(JsonObject node) 348if (Value is JsonObject jsonObject)
System\Text\Json\Nodes\JsonObject.IDictionary.cs (25)
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 the specified property to the <see cref="JsonObject"/>. 38/// The KeyValuePair structure representing the property name and value to add to the <see cref="JsonObject"/>. 41/// An element with the same property name already exists in the <see cref="JsonObject"/>. 49/// Removes all elements from the <see cref="JsonObject"/>. 70/// Determines whether the <see cref="JsonObject"/> contains an element with the specified property name. 72/// <param name="propertyName">The property name to locate in the <see cref="JsonObject"/>.</param> 74/// <see langword="true"/> if the <see cref="JsonObject"/> contains an element with the specified property name; otherwise, <see langword="false"/>. 87/// Gets the number of elements contained in <see cref="JsonObject"/>. 92/// Removes the element with the specified property name from the <see cref="JsonObject"/>. 115/// Determines whether the <see cref="JsonObject"/> contains a specific property name and <see cref="JsonNode"/> reference. 117/// <param name="item">The element to locate in the <see cref="JsonObject"/>.</param> 119/// <see langword="true"/> if the <see cref="JsonObject"/> contains an element with the property name; otherwise, <see langword="false"/>. 125/// Copies the elements of the <see cref="JsonObject"/> to an array of type KeyValuePair starting at the specified array index. 128/// The one-dimensional Array that is the destination of the elements copied from <see cref="JsonObject"/>. 145/// Returns an enumerator that iterates through the <see cref="JsonObject"/>. 148/// An enumerator that iterates through the <see cref="JsonObject"/>. 153/// Removes a key and value from the <see cref="JsonObject"/>. 156/// The KeyValuePair structure representing the property name and value to remove from the <see cref="JsonObject"/>. 164/// Gets a collection containing the property names in the <see cref="JsonObject"/>. 169/// Gets a collection containing the property values in the <see cref="JsonObject"/>. 182/// <see langword="true"/> if the <see cref="JsonObject"/> contains an element with the specified property name; otherwise, <see langword="false"/>. 200/// Returns an enumerator that iterates through the <see cref="JsonObject"/>. 203/// 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"/> or
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; 50public override void Write(Utf8JsonWriter writer, JsonObject? value, JsonSerializerOptions options) 61public override JsonObject? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 77internal static JsonObject ReadAsJsonElement(ref Utf8JsonReader reader, JsonNodeOptions options) 83internal static JsonObject ReadAsJsonNode(ref Utf8JsonReader reader, JsonNodeOptions options) 87JsonObject 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)
160var root = new JsonObject(); 163var projectJson = new JsonObject(); 177var endpointJsonObject = new JsonObject