449 instantiations of JsonObject
aspire (33)
Aspire.Cli.Tests (52)
Aspire.Dashboard (15)
Aspire.Dashboard.Tests (9)
Aspire.Hosting (7)
Aspire.Hosting.Azure (4)
Aspire.Hosting.Azure.Tests (48)
Aspire.Hosting.RemoteHost.Tests (136)
CapabilityDispatcherTests.cs (88)
73dispatcher.Invoke("test/capability@1", new JsonObject { ["name"] = "test-value" });
168var args = new JsonObject { ["value"] = "hello" };
180var args = new JsonObject { ["required"] = "test" };
192var args = new JsonObject { ["required"] = "test", ["optional"] = "custom" };
233var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = handleId } };
260var args = new JsonObject { ["context"] = "not-a-handle" };
272var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = "Aspire.Hosting.RemoteHost.Tests/Aspire.Hosting.RemoteHost.Tests.TestContextType:999" } };
326var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = handleId } };
345var nestedArgs = new JsonObject { ["context"] = new JsonObject { ["$handle"] = nestedHandleId } };
403var args = new JsonObject
405["context"] = new JsonObject { ["$handle"] = handleId },
424var args = new JsonObject
426["context"] = new JsonObject { ["$handle"] = handleId },
443var args = new JsonObject
445["context"] = new JsonObject { ["$handle"] = handleId },
462var args = new JsonObject
464["context"] = new JsonObject { ["$handle"] = handleId }
495var args = new JsonObject
497["context"] = new JsonObject { ["$handle"] = handleId }
513var args = new JsonObject
515["context"] = new JsonObject { ["$handle"] = handleId },
534var args = new JsonObject
536["context"] = new JsonObject { ["$handle"] = handleId },
579var args = new JsonObject
602var args = new JsonObject
623var args = new JsonObject
646var args = new JsonObject
665var args = new JsonObject
693var args = new JsonObject { ["value"] = "test" };
704var args = new JsonObject { ["value"] = "hello" };
716var args = new JsonObject { ["value"] = "test" };
730var args = new JsonObject
745var args = new JsonObject { ["count"] = 3 };
762var args = new JsonObject
778var args = new JsonObject { ["value"] = "hello" };
790var args = new JsonObject { ["value"] = 42 };
826var args = new JsonObject
828["list"] = new JsonObject { ["$handle"] = listHandle },
850var removeArgs = new JsonObject
852["list"] = new JsonObject { ["$handle"] = listHandle },
861var lengthArgs = new JsonObject
863["list"] = new JsonObject { ["$handle"] = listHandle }
882var args = new JsonObject
884["list"] = new JsonObject { ["$handle"] = listHandle }
905var clearArgs = new JsonObject
907["list"] = new JsonObject { ["$handle"] = listHandle }
912var lengthArgs = new JsonObject
914["list"] = new JsonObject { ["$handle"] = listHandle }
950var args = new JsonObject
952["dict"] = new JsonObject { ["$handle"] = dictHandle },
974var removeArgs = new JsonObject
976["dict"] = new JsonObject { ["$handle"] = dictHandle },
985var countArgs = new JsonObject
987["dict"] = new JsonObject { ["$handle"] = dictHandle }
1007var hasArgs = new JsonObject
1009["dict"] = new JsonObject { ["$handle"] = dictHandle },
1018var hasArgs2 = new JsonObject
1020["dict"] = new JsonObject { ["$handle"] = dictHandle },
1040var args = new JsonObject
1042["dict"] = new JsonObject { ["$handle"] = dictHandle }
1066var args = new JsonObject
1068["dict"] = new JsonObject { ["$handle"] = dictHandle }
1083var args = new JsonObject
1100var args = new JsonObject
1117var args = new JsonObject
1134var args = new JsonObject
1151var result = dispatcher.Invoke("Aspire.Hosting.RemoteHost.Tests/acceptOptionalEnum", new JsonObject());
1160var args = new JsonObject
1162["dto"] = new JsonObject
1179var args = new JsonObject
1181["dto"] = new JsonObject
1197var args = new JsonObject();
1219var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = handleId } };
1237var args = new JsonObject
1239["context"] = new JsonObject { ["$handle"] = handleId },
1257var args = new JsonObject
1259["context"] = new JsonObject { ["$handle"] = handleId },
1278var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = handleId } };
1295var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = handleId } };
1310var args = new JsonObject { ["context"] = new JsonObject { ["$handle"] = handleId } };
Aspire.Hosting.Tests (21)
Aspire.Hosting.Yarp (4)
aspire-server (6)
ConfigurationSchemaGenerator (13)
dotnet-user-jwts (5)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (15)
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")]) };
Microsoft.AspNetCore.OpenApi (23)
Microsoft.AspNetCore.OpenApi.Tests (2)
Microsoft.DotNet.Internal.SymbolHelper (3)
Microsoft.Extensions.AI (2)
Microsoft.Extensions.AI.Abstractions (9)
Microsoft.Extensions.AI.Abstractions.Tests (2)
Microsoft.Extensions.AI.Evaluation.Quality (1)
Microsoft.Extensions.AI.Evaluation.Safety (13)
MSBuild (10)
ServiceBus.AppHost (1)
Shared.Tests (1)
Stress.ApiService (1)
System.Text.Json (10)
TestProject.AppHost (3)
779 references to JsonObject
aspire (102)
Agents\DeprecatedMcpCommandScanner.cs (16)
65var config = JsonNode.Parse(content)?.AsObject();
104private static bool HasDeprecatedMcpCommand(JsonObject config, AgentConfigLocation location)
118private static bool HasDeprecatedMcpServersArgs(JsonObject config, string serversKey)
120if (!config.TryGetPropertyValue(serversKey, out var serversNode) || serversNode is not JsonObject servers)
125if (!servers.TryGetPropertyValue("aspire", out var aspireNode) || aspireNode is not JsonObject aspire)
150private static bool HasDeprecatedMcpCommandArray(JsonObject config, string serversKey)
152if (!config.TryGetPropertyValue(serversKey, out var mcpNode) || mcpNode is not JsonObject mcp)
157if (!mcp.TryGetPropertyValue("aspire", out var aspireNode) || aspireNode is not JsonObject aspire)
182private AgentEnvironmentApplicator CreateUpdateApplicator(AgentConfigLocation location, string configPath, JsonObject config)
198private async Task UpdateConfigAsync(AgentConfigLocation location, string configPath, JsonObject config, CancellationToken cancellationToken)
220private static void UpdateMcpServersArgs(JsonObject config, string serversKey)
223serversNode is JsonObject servers &&
225aspireNode is JsonObject aspire)
234private static void UpdateMcpCommandArray(JsonObject config, string serversKey)
237mcpNode is JsonObject mcp &&
239aspireNode is JsonObject aspire)
Aspire.Cli.Tests (104)
Aspire.Dashboard (24)
Aspire.Dashboard.Tests (4)
Aspire.Hosting (52)
Aspire.Hosting.Azure (16)
Aspire.Hosting.Azure.Tests (34)
Aspire.Hosting.RemoteHost.Tests (129)
Aspire.Hosting.Tests (23)
Aspire.Hosting.Yarp (5)
aspire-server (35)
Ats\AtsCallbackProxyFactory.cs (16)
128var jsonObjectType = typeof(JsonObject);
187argsExpr ?? Expression.Constant(null, typeof(JsonObject)),
201argsExpr ?? Expression.Constant(null, typeof(JsonObject)),
215argsExpr ?? Expression.Constant(null, typeof(JsonObject)),
229argsExpr ?? Expression.Constant(null, typeof(JsonObject)),
233private void InvokeSyncVoid(string callbackId, JsonObject? args, CancellationToken cancellationToken)
239private void InvokeSyncVoidWithDtoWriteback(string callbackId, JsonObject? args, object?[] originalArgs, Type[] argTypes, CancellationToken cancellationToken)
246private T? InvokeSyncResult<T>(string callbackId, JsonObject? args, CancellationToken cancellationToken)
253private async Task InvokeAsyncVoid(string callbackId, JsonObject? args, CancellationToken cancellationToken)
259private async Task InvokeAsyncVoidWithDtoWriteback(string callbackId, JsonObject? args, object?[] originalArgs, Type[] argTypes, CancellationToken cancellationToken)
266private async Task<T?> InvokeAsyncResult<T>(string callbackId, JsonObject? args, CancellationToken cancellationToken)
289private void AddCancellationTokenToArgs(ref JsonObject? args, CancellationToken cancellationToken)
318argsExpr ?? Expression.Constant(null, typeof(JsonObject)),
336argsExpr ?? Expression.Constant(null, typeof(JsonObject)),
366if (result is not JsonObject returnedArgs)
394if (returnedArgs[key] is JsonObject modifiedDto)
Ats\CapabilityDispatcher.cs (10)
21JsonObject? args,
475public async Task<JsonNode?> InvokeAsync(string capabilityId, JsonObject? args)
517public JsonNode? Invoke(string capabilityId, JsonObject? args)
579public static string GetRequiredString(this JsonObject args, string name, string capabilityId)
593public static string? GetOptionalString(this JsonObject args, string name)
605public static int? GetOptionalInt(this JsonObject args, string name)
618this JsonObject args,
648public static T? GetDto<T>(this JsonObject args, string name) where T : class
650if (args.TryGetPropertyValue(name, out var node) && node is JsonObject obj)
660public static JsonObject CreateHandleResult(this HandleRegistry handles, object obj, string typeId)
ConfigurationSchemaGenerator (23)
ConfigSchemaEmitter.cs (23)
44var root = new JsonObject();
51private void GenerateLogCategories(JsonObject parent)
59var propertiesNode = new JsonObject(s_ignoreCaseNodeOptions);
62var categoryNode = new JsonObject();
76private void GenerateGraph(JsonObject rootNode)
101private bool GeneratePathSegment(JsonObject currentNode, TypeSpec type, Queue<string> pathSegments)
123if (currentNode[propertiesName] is not JsonObject propertiesNode)
132if (propertiesNode[pathSegment] is not JsonObject pathSegmentNode)
182private bool GenerateType(JsonObject currentNode, TypeSpec type)
226private bool GenerateObject(JsonObject currentNode, ObjectSpec objectSpec)
244if (currentNode["properties"] is not JsonObject propertiesNode)
275private bool GenerateProperty(JsonObject currentNode, PropertySpec property, IPropertySymbol? propertySymbol)
286var propertyNode = new JsonObject();
306private bool GenerateCollection(JsonObject currentNode, CollectionSpec collection, string typeName, string containerName)
319var containerNode = new JsonObject();
334private static void RestoreBackup(JsonNode? backupNode, string name, JsonObject parentNode)
434private static void GenerateDescriptionFromDocComment(JsonObject propertyNode, string docComment)
490private void GenerateDescriptionForType(JsonObject currentNode, TypeSpec type)
587private void GenerateParsableFromString(JsonObject propertyNode, ParsableFromStringSpec parsable)
678private bool IsExcluded(JsonObject currentNode, PropertySpec property)
718private static void ReplaceNodeWithKeyCasingChange(JsonObject jsonObject, string key, JsonNode value)
739case JsonObject obj:
743obj.Parent is JsonObject && obj.GetPropertyName() == "properties" ?
dotnet-user-jwts (11)
IdentitySample.PasskeyConformance (1)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (18)
Microsoft.AspNetCore.Identity.Test (10)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (13)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (5)
Microsoft.AspNetCore.OpenApi (9)
Microsoft.AspNetCore.OpenApi.Tests (3)
Microsoft.Build.BuildCheck.UnitTests (3)
Microsoft.DotNet.Internal.SymbolHelper (4)
Microsoft.Extensions.AI (2)
Microsoft.Extensions.AI.Abstractions (29)
Microsoft.Extensions.AI.Abstractions.Tests (8)
Microsoft.Extensions.AI.Evaluation.Safety (9)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.ML.AutoML (1)
Microsoft.ML.AutoML.SourceGenerator (1)
Microsoft.ML.GenAI.Mistral (2)
MSBuild (7)
Roslyn.VisualStudio.Next.UnitTests (2)
Shared.Tests (2)
System.Text.Json (82)
System.Windows.Forms.Analyzers.Tests (2)
TestProject.AppHost (3)