81 instantiations of JsonObject
Aspire.Dashboard (1)
Otlp\Model\OtlpHelpers.cs (1)
138
var o = new
JsonObject
();
Aspire.Dashboard.Tests (9)
Integration\OtlpGrpcServiceTests.cs (6)
163
var configJson = new
JsonObject
165
["Dashboard"] = new
JsonObject
167
["Otlp"] = new
JsonObject
205
configJson = new
JsonObject
207
["Dashboard"] = new
JsonObject
209
["Otlp"] = new
JsonObject
Integration\StartupTests.cs (3)
509
var configJson = new
JsonObject
511
["Logging"] = new
JsonObject
513
["LogLevel"] = new
JsonObject
Aspire.Hosting (3)
Devcontainers\DevcontainerSettingsWriter.cs (2)
42
portsAttributes = new
JsonObject
();
55
portAttributes = new
JsonObject
();
src\Shared\SecretsStore.cs (1)
52
var contents = new
JsonObject
();
Aspire.Hosting.Azure (3)
Provisioning\JsonExtensions.cs (1)
18
node = new
JsonObject
();
Provisioning\Provisioners\BicepProvisioner.cs (2)
221
var parameters = new
JsonObject
();
495
parameters[parameter.Key] = new
JsonObject
()
Aspire.Hosting.Azure.Tests (12)
AzureBicepProvisionerTests.cs (11)
23
var parameters = new
JsonObject
();
54
.WithParameter("jsonObj", new
JsonObject
{ ["key"] = "value" })
59
var parameters = new
JsonObject
();
82
.WithParameter("jsonObj", new
JsonObject
{ ["key"] = "value" });
88
.WithParameter("jsonObj", new
JsonObject
{ ["key"] = "value" });
90
var parameters0 = new
JsonObject
();
94
var parameters1 = new
JsonObject
();
145
.WithParameter("jsonObj", new
JsonObject
{ ["key"] = "value" });
147
var parameters0 = new
JsonObject
();
151
var parameters1 = new
JsonObject
();
175
var parameters0 = new
JsonObject
();
AzureBicepResourceTests.cs (1)
187
.WithParameter("param3", new
JsonObject
() { ["value"] = "nested" })
ConfigurationSchemaGenerator (11)
ConfigSchemaEmitter.cs (11)
44
var root = new
JsonObject
();
62
var categoryNode = new
JsonObject
();
67
parent["definitions"] = new
JsonObject
69
["logLevel"] = new
JsonObject
140
pathSegmentNode = new
JsonObject
();
246
propertiesNode = new
JsonObject
();
286
var propertyNode = new
JsonObject
();
319
var containerNode = new
JsonObject
();
632
new
JsonObject
637
new
JsonObject
640
["items"] = new
JsonObject
dotnet-user-jwts (5)
Helpers\JwtAuthenticationSchemeSettings.cs (4)
22
var settingsObject = new
JsonObject
38
authentication.Add(SchemesKey, new
JsonObject
46
config[AuthenticationKey] = new
JsonObject
48
[SchemesKey] = new
JsonObject
Helpers\SigningKeysHandler.cs (1)
75
secrets ??= new
JsonObject
();
Microsoft.AspNetCore.OpenApi (11)
Extensions\JsonNodeSchemaExtensions.cs (1)
373
var mappings = new
JsonObject
();
Services\Schemas\OpenApiSchemaService.cs (5)
66
schema = new
JsonObject
75
schema = new
JsonObject
78
[OpenApiSchemaKeywords.ItemsKeyword] = new
JsonObject
91
schema = new
JsonObject
();
105
return new
JsonObject
{ [OpenApiSchemaKeywords.RefKeyword] = context.TypeInfo.GetSchemaReferenceId() };
Services\Schemas\OpenApiSchemaStore.cs (5)
21
[new OpenApiSchemaKey(typeof(IFormFile), null)] = new
JsonObject
27
[new OpenApiSchemaKey(typeof(IFormFileCollection), null)] = new
JsonObject
30
["items"] = new
JsonObject
38
[new OpenApiSchemaKey(typeof(Stream), null)] = new
JsonObject
44
[new OpenApiSchemaKey(typeof(PipeReader), null)] = new
JsonObject
Microsoft.DotNet.Internal.SymbolHelper (3)
SymbolPromotionHelper.cs (3)
103
JsonObject registrationPayload =
new
()
123
JsonObject visibilityPayload =
new
()
252
JsonObject extensionPayload =
new
()
MSBuild (10)
JsonOutputFormatter.cs (9)
21
private readonly JsonNode _topLevelNode = new
JsonObject
();
37
JsonNode propertiesNode = new
JsonObject
();
55
JsonNode itemsNode = new
JsonObject
();
61
JsonObject jsonItem =
new
();
91
JsonObject itemsNode =
new
();
97
JsonObject jsonItem =
new
();
132
JsonObject targetResultsNode =
new
();
136
JsonObject targetResults =
new
();
141
JsonObject jsonItem =
new
();
XMake.cs (1)
4639
var jsonNode = new
JsonObject
();
Stress.ApiService (1)
Program.cs (1)
210
var jsonWithUrl = new
JsonObject
System.Text.Json (9)
System\Text\Json\Nodes\JsonObject.cs (4)
64
JsonValueKind.Object => new
JsonObject
(element, options),
90
? new
JsonObject
(jsonElement.Value.Clone(), Options)
91
: new
JsonObject
(Options);
94
var jObject = new
JsonObject
(Options)
System\Text\Json\Schema\JsonSchema.cs (2)
158
var objSchema = new
JsonObject
();
192
var properties = new
JsonObject
();
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
70
node = new
JsonObject
(element, options);
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (2)
15
jsonTypeInfo.CreateObjectForExtensionDataProperty = () => new
JsonObject
(options.GetNodeOptions());
65
JsonObject jObject = new
JsonObject
(jElement, options);
TestProject.AppHost (3)
TestProgram.cs (3)
146
var root = new
JsonObject
();
149
var projectJson = new
JsonObject
();
163
var endpointJsonObject = new
JsonObject
181 references to JsonObject
Aspire.Dashboard (2)
Otlp\Model\OtlpHelpers.cs (2)
136
static
JsonObject
ConvertKeyValues(KeyValueList value)
138
var
o = new JsonObject();
Aspire.Dashboard.Tests (2)
Integration\OtlpGrpcServiceTests.cs (1)
163
var
configJson = new JsonObject
Integration\StartupTests.cs (1)
509
var
configJson = new JsonObject
Aspire.Hosting (9)
Dashboard\DashboardLifecycleHook.cs (1)
438
public
JsonObject
? State { get; set; }
Devcontainers\DevcontainerSettingsWriter.cs (7)
37
var
settings = (
JsonObject
)
JsonObject
.Parse(settingsContent)!;
39
JsonObject
? portsAttributes;
47
portsAttributes = (
JsonObject
)portsAttributesNode!;
52
JsonObject
? portAttributes;
60
portAttributes = (
JsonObject
)portAttributeNode!;
src\Shared\SecretsStore.cs (1)
52
var
contents = new JsonObject();
Aspire.Hosting.Azure (12)
Provisioning\Provisioners\AzureProvisioner.cs (5)
192
private static async Task<
JsonObject
> GetUserSecretsAsync(string? userSecretsPath, CancellationToken cancellationToken)
217
var userSecretsLazy = new Lazy<Task<
JsonObject
>>(() => GetUserSecretsAsync(userSecretsPath, cancellationToken));
239
var
userSecrets = await userSecretsLazy.Value.ConfigureAwait(false);
360
private async Task<ProvisioningContext> GetProvisioningContextAsync(Lazy<Task<
JsonObject
>> userSecretsLazy, CancellationToken cancellationToken)
427
var
userSecrets = await userSecretsLazy.Value.ConfigureAwait(false);
Provisioning\Provisioners\AzureResourceProvisionerOfT.cs (2)
27
JsonObject
userSecrets)
37
public
JsonObject
UserSecrets => userSecrets;
Provisioning\Provisioners\BicepProvisioner.cs (5)
221
var
parameters = new JsonObject();
278
var outputObj = outputs?.ToObjectFromJson<
JsonObject
>();
423
internal static string GetChecksum(AzureBicepResource resource,
JsonObject
parameters)
447
var
parameters = JsonNode.Parse(jsonString)?.AsObject();
481
internal static async Task SetParametersAsync(
JsonObject
parameters, AzureBicepResource resource, bool skipDynamicValues = false, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.Tests (7)
AzureBicepProvisionerTests.cs (7)
23
var
parameters = new JsonObject();
59
var
parameters = new JsonObject();
90
var
parameters0 = new JsonObject();
94
var
parameters1 = new JsonObject();
147
var
parameters0 = new JsonObject();
151
var
parameters1 = new JsonObject();
175
var
parameters0 = new JsonObject();
Aspire.Hosting.Redis.Tests (1)
RedisFunctionalTests.cs (1)
670
var jo =
JsonObject
.Parse(content);
ConfigurationSchemaGenerator (23)
ConfigSchemaEmitter.cs (23)
44
var
root = new JsonObject();
51
private void GenerateLogCategories(
JsonObject
parent)
59
var
propertiesNode = new JsonObject(s_ignoreCaseNodeOptions);
62
var
categoryNode = new JsonObject();
76
private void GenerateGraph(
JsonObject
rootNode)
101
private bool GeneratePathSegment(
JsonObject
currentNode, TypeSpec type, Queue<string> pathSegments)
123
if (currentNode[propertiesName] is not
JsonObject
propertiesNode)
132
if (propertiesNode[pathSegment] is not
JsonObject
pathSegmentNode)
182
private bool GenerateType(
JsonObject
currentNode, TypeSpec type)
226
private bool GenerateObject(
JsonObject
currentNode, ObjectSpec objectSpec)
244
if (currentNode["properties"] is not
JsonObject
propertiesNode)
275
private bool GenerateProperty(
JsonObject
currentNode, PropertySpec property, IPropertySymbol? propertySymbol)
286
var
propertyNode = new JsonObject();
306
private bool GenerateCollection(
JsonObject
currentNode, CollectionSpec collection, string typeName, string containerName)
319
var
containerNode = new JsonObject();
334
private static void RestoreBackup(JsonNode? backupNode, string name,
JsonObject
parentNode)
434
private static void GenerateDescriptionFromDocComment(
JsonObject
propertyNode, string docComment)
490
private void GenerateDescriptionForType(
JsonObject
currentNode, TypeSpec type)
587
private void GenerateParsableFromString(
JsonObject
propertyNode, ParsableFromStringSpec parsable)
678
private bool IsExcluded(
JsonObject
currentNode, PropertySpec property)
718
private static void ReplaceNodeWithKeyCasingChange(
JsonObject
jsonObject, string key, JsonNode value)
744
case
JsonObject
obj:
748
obj.Parent is
JsonObject
&& obj.GetPropertyName() == "properties" ?
dotnet-user-jwts (11)
Helpers\JwtAuthenticationSchemeSettings.cs (9)
19
var
config = JsonSerializer.Deserialize<
JsonObject
>(reader, JwtSerializerOptions.Default);
22
var
settingsObject = new JsonObject
28
if (config[AuthenticationKey] is
JsonObject
authentication)
30
if (authentication[SchemesKey] is
JsonObject
schemes)
67
var
config = JsonSerializer.Deserialize<
JsonObject
>(reader, JwtSerializerOptions.Default);
70
if (config[AuthenticationKey] is
JsonObject
authentication &&
71
authentication[SchemesKey] is
JsonObject
schemes)
Helpers\SigningKeysHandler.cs (2)
65
JsonObject
secrets = null;
71
secrets = JsonSerializer.Deserialize<
JsonObject
>(secretsFileStream, JwtSerializerOptions.Default);
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (15)
UserJwtsTests.cs (15)
112
var
appSettings = JsonSerializer.Deserialize<
JsonObject
>(File.ReadAllText(appsettings));
115
appSettings = JsonSerializer.Deserialize<
JsonObject
>(File.ReadAllText(appsettings));
247
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
466
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
494
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
533
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
555
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
577
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
Microsoft.AspNetCore.OpenApi (2)
Extensions\JsonNodeSchemaExtensions.cs (1)
373
var
mappings = new JsonObject();
Services\Schemas\OpenApiSchemaStore.cs (1)
60
/// <returns>A <see cref="
JsonObject
" /> representing the JSON schema associated with the key.</returns>
Microsoft.Build.BuildCheck.UnitTests (3)
EndToEndTests.cs (3)
153
private readonly record struct EmbedResourceTestOutput(String LogOutput,
JsonObject
DepsJsonResources);
180
JsonNode? depsJson =
JsonObject
.Parse(File.ReadAllText(depsFiles[0]));
184
var
resources = depsJson!["targets"]?.AsObject().First().Value?[$"{referencedProjectName}/1.0.0"]?["resources"]?.AsObject();
Microsoft.DotNet.Internal.SymbolHelper (4)
SymbolPromotionHelper.cs (4)
103
JsonObject
registrationPayload = new()
123
JsonObject
visibilityPayload = new()
138
async Task<bool> SendPostRequestWithRetries(string url,
JsonObject
payload)
252
JsonObject
extensionPayload = new()
Microsoft.ML.AutoML (1)
SweepableEstimator\Converter\SweepableEstimatorConverter.cs (1)
29
var jObject =
JsonObject
.Parse("{}");
Microsoft.ML.AutoML.SourceGenerator (1)
SearchSpaceGenerator.cs (1)
93
else if (searchSpaceNode is
JsonObject
searchSpaceObject && searchSpaceObject.ContainsKey("min"))
Microsoft.ML.GenAI.Mistral (2)
Mistral_7B_0_3ChatTemplateBuilder.cs (1)
125
arguments =
JsonObject
.Parse(tc.FunctionArguments),
MistralCausalLMAgent.cs (1)
140
public
JsonObject
? Arguments { get; set; }
MSBuild (7)
JsonOutputFormatter.cs (6)
61
JsonObject
jsonItem = new();
91
JsonObject
itemsNode = new();
97
JsonObject
jsonItem = new();
132
JsonObject
targetResultsNode = new();
136
JsonObject
targetResults = new();
141
JsonObject
jsonItem = new();
XMake.cs (1)
4639
var
jsonNode = new JsonObject();
System.Text.Json (76)
System\Text\Json\Nodes\JsonArray.cs (2)
102
case
JsonObject
:
396
if (Value is
JsonObject
jsonObject)
System\Text\Json\Nodes\JsonNode.cs (17)
74
/// Casts to the derived <see cref="
JsonObject
"/> type.
77
/// A <see cref="
JsonObject
"/>.
80
/// The node is not a <see cref="
JsonObject
"/>.
82
public
JsonObject
AsObject()
84
JsonObject
? jObject = this as
JsonObject
;
88
ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(
JsonObject
));
118
/// A parent can either be a <see cref="
JsonObject
"/> or a <see cref="JsonArray"/>.
208
/// The current <see cref="JsonNode"/> is not a <see cref="JsonArray"/> or <see cref="
JsonObject
"/>.
218
ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonArray), nameof(
JsonObject
));
223
ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonArray), nameof(
JsonObject
));
234
/// The current <see cref="JsonNode"/> is not a <see cref="
JsonObject
"/>.
267
/// The current parent is not a <see cref="
JsonObject
"/>.
271
JsonObject
? parentObject = _parent as
JsonObject
;
275
ThrowHelper.ThrowInvalidOperationException_NodeParentWrongType(nameof(
JsonObject
));
333
case
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"/>.
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>
59
public static
JsonObject
? Create(JsonElement element, JsonNodeOptions? options = null)
94
var
jObject = new JsonObject(Options)
179
case
JsonObject
jsonObject:
304
private readonly
JsonObject
_node;
306
public DebugView(
JsonObject
node)
357
if (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
"/>.
38
/// Adds the specified property to the <see cref="
JsonObject
"/>.
41
/// The KeyValuePair structure representing the property name and value to add to the <see cref="
JsonObject
"/>.
44
/// An element with the same property name already exists in the <see cref="
JsonObject
"/>.
52
/// Removes all elements from the <see cref="
JsonObject
"/>.
73
/// Determines whether the <see cref="
JsonObject
"/> contains an element with the specified property name.
75
/// <param name="propertyName">The property name to locate in the <see cref="
JsonObject
"/>.</param>
77
/// <see langword="true"/> if the <see cref="
JsonObject
"/> contains an element with the specified property name; otherwise, <see langword="false"/>.
93
/// Gets the number of elements contained in <see cref="
JsonObject
"/>.
98
/// Removes the element with the specified property name from the <see cref="
JsonObject
"/>.
124
/// Determines whether the <see cref="
JsonObject
"/> contains a specific property name and <see cref="JsonNode"/> reference.
126
/// <param name="item">The element to locate in the <see cref="
JsonObject
"/>.</param>
128
/// <see langword="true"/> if the <see cref="
JsonObject
"/> contains an element with the property name; otherwise, <see langword="false"/>.
134
/// Copies the elements of the <see cref="
JsonObject
"/> to an array of type KeyValuePair starting at the specified array index.
137
/// The one-dimensional Array that is the destination of the elements copied from <see cref="
JsonObject
"/>.
154
/// Returns an enumerator that iterates through the <see cref="
JsonObject
"/>.
157
/// An enumerator that iterates through the <see cref="
JsonObject
"/>.
162
/// Removes a key and value from the <see cref="
JsonObject
"/>.
165
/// The KeyValuePair structure representing the property name and value to remove from the <see cref="
JsonObject
"/>.
173
/// Gets a collection containing the property names in the <see cref="
JsonObject
"/>.
178
/// Gets a collection containing the property values in the <see cref="
JsonObject
"/>.
191
/// <see langword="true"/> if the <see cref="
JsonObject
"/> contains an element with the specified property name; otherwise, <see langword="false"/>.
212
/// Returns an enumerator that iterates through the <see cref="
JsonObject
"/>.
215
/// An enumerator that iterates through the <see cref="
JsonObject
"/>.
System\Text\Json\Nodes\JsonObject.IList.cs (1)
71
/// <exception cref="ArgumentException">An element with the same key already exists in the <see cref="
JsonObject
"/>.</exception>
System\Text\Json\Schema\JsonSchema.cs (2)
158
var
objSchema = new JsonObject();
192
var
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)
19
if (typeof(
JsonObject
) == typeToConvert)
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (8)
11
internal sealed class JsonObjectConverter : JsonConverter<
JsonObject
?>
28
Debug.Assert(obj is
JsonObject
);
29
JsonObject
jObject = (
JsonObject
)obj;
37
public override void Write(Utf8JsonWriter writer,
JsonObject
? value, JsonSerializerOptions options)
48
public override
JsonObject
? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
62
public static
JsonObject
ReadObject(ref Utf8JsonReader reader, JsonNodeOptions? options)
65
JsonObject
jObject = new JsonObject(jElement, options);
System\Text\Json\Serialization\JsonConverterOfT.cs (1)
461
Debug.Assert(Type == typeof(Nodes.
JsonObject
));
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (1)
422
if (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.
153
public static JsonConverter<
JsonObject
?> JsonObjectConverter => s_jsonObjectConverter ??= new JsonObjectConverter();
154
private static JsonConverter<
JsonObject
?>? s_jsonObjectConverter;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
878
Debug.Assert(propValue is Nodes.
JsonObject
);
TestProject.AppHost (3)
TestProgram.cs (3)
146
var
root = new JsonObject();
149
var
projectJson = new JsonObject();
163
var
endpointJsonObject = new JsonObject