76 references to Parse
JwtBearerSample (1)
Startup.cs (1)
77using (var json = JsonDocument.Parse(body))
Microsoft.AspNetCore.Authentication.Facebook (1)
FacebookHandler.cs (1)
58using (var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted)))
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
56using (var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted)))
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
52using (var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted)))
Microsoft.AspNetCore.Authentication.OAuth (3)
OAuthHandler.cs (3)
227true => OAuthTokenResponse.Success(JsonDocument.Parse(body)), 234var exception = OAuthTokenResponse.GetStandardErrorException(JsonDocument.Parse(body)); 254using (var user = JsonDocument.Parse("{}"))
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
OpenIdConnectHandler.cs (3)
916using (var payload = JsonDocument.Parse("{}")) 1068user = JsonDocument.Parse(userInfoResponse); 1073user = JsonDocument.Parse(userInfoEndpointJwt.Payload.SerializeToJson());
Microsoft.AspNetCore.Authentication.Test (14)
ClaimActionTests.cs (7)
15var userData = JsonDocument.Parse("{ \"name\": \"test\" }"); 29var userData = JsonDocument.Parse("{ \"role\": [ \"role1\", null, \"role2\" ] }"); 47var userData = JsonDocument.Parse("{ \"name\": { \"subkey\": \"test\" } }"); 61var userData = JsonDocument.Parse("{ \"role\": { \"subkey\": [ \"role1\", null, \"role2\" ] } }"); 79var userData = JsonDocument.Parse("{ \"name0\": \"value0\", \"name1\": \"value1\" }"); 94var userData = JsonDocument.Parse("{ \"name0\": \"value0\", \"name1\": \"value1\" }"); 109var userData = JsonDocument.Parse("{ \"name0\": \"value0\", \"name1\": \"value1\" }");
JsonDocumentAuthExtensionsTests.cs (1)
18using (var document = JsonDocument.Parse(json))
JwtBearerTests.cs (2)
954using var dom = JsonDocument.Parse(responseBody); 998using var dom = JsonDocument.Parse(responseBody);
JwtBearerTests_Handler.cs (2)
898using var dom = JsonDocument.Parse(responseBody); 941using var dom = JsonDocument.Parse(responseBody);
OpenIdConnect\UniqueJsonKeyClaimActionTests.cs (2)
15var userData = JsonDocument.Parse("{ \"jsonKey\": \"value\" }"); 31var userData = JsonDocument.Parse("{ \"jsonKey\": \"value\" }");
Microsoft.AspNetCore.Authentication.Twitter (2)
TwitterHandler.cs (2)
123user = JsonDocument.Parse("{}"); 333var result = JsonDocument.Parse(responseText);
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
148var res = System.Text.Json.JsonDocument.Parse(await ReceiveMessageLoop(browserDebugClientConnect, token)).RootElement;
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (9)
ConverterTests\JsonConverterWriteTests.cs (2)
546using var doc1 = JsonDocument.Parse(jsonNew); 547using var doc2 = JsonDocument.Parse(jsonOld);
ServerStreamingServerCallHandlerTests.cs (7)
67using var responseJson1 = JsonDocument.Parse(line1!); 74using var responseJson2 = JsonDocument.Parse(line2!); 111using var responseJson1 = JsonDocument.Parse(line1!); 115using var responseJson2 = JsonDocument.Parse(line2!); 153using var responseJson1 = JsonDocument.Parse(line1!); 157using var responseJson2 = JsonDocument.Parse(line2!); 194using var responseJson = JsonDocument.Parse(line!);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
HttpsTests.cs (1)
162var result = System.Text.Json.JsonDocument.Parse(response).RootElement;
Microsoft.Build (1)
Construction\Solution\SolutionFile.cs (1)
659JsonDocument text = JsonDocument.Parse(File.ReadAllText(solutionFilterFile), options);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
StringCopyPaste\StringCopyPasteData.cs (1)
48var value = JsonSerializer.Deserialize(JsonDocument.Parse(json), typeof(StringCopyPasteData));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (1)
175JsonDocument.Parse(token.ValueText, new JsonDocumentOptions { AllowTrailingCommas = false, CommentHandling = JsonCommentHandling.Disallow });
Microsoft.CodeAnalysis.Features (1)
PdbSourceDocument\SourceLinkMap.cs (1)
72var root = JsonDocument.Parse(json, new JsonDocumentOptions() { AllowTrailingCommas = true }).RootElement;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
UriTests.cs (3)
178var jsonDocument = JsonDocument.Parse(requestJson); 233var jsonDocument = JsonDocument.Parse(requestJson); 281var jsonDocument = JsonDocument.Parse(requestJson);
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.SolutionFilterReader.cs (1)
27using var document = JsonDocument.Parse(File.ReadAllText(filterFilename));
Microsoft.Extensions.AI (1)
ChatCompletion\ChatCompletion{T}.cs (1)
145if (JsonDocument.Parse(json!).RootElement.TryGetProperty("data", out var data))
Microsoft.Extensions.AI.Abstractions.Tests (13)
ChatCompletion\ChatResponseFormatTests.cs (1)
12private static JsonElement EmptySchema => JsonDocument.Parse("{}").RootElement;
Functions\AIFunctionParameterMetadataTests.cs (3)
42Schema = JsonDocument.Parse("""{"type":"integer"}"""), 65Schema = JsonDocument.Parse("""{"type":"integer"}"""), 75Schema = JsonDocument.Parse("""{"type":"number"}"""),
Functions\AIFunctionReturnParameterMetadataTests.cs (1)
27Schema = JsonDocument.Parse("""{"type":"integer"}"""),
test\Shared\JsonSchemaExporter\TestTypes.cs (3)
100yield return new TestData<JsonDocument>(JsonDocument.Parse("""[{ "x" : 42 }]"""), "true"); 101yield return new TestData<JsonElement>(JsonDocument.Parse("""[{ "x" : 42 }]""").RootElement, "true"); 117yield return new TestData<JsonElement?>(JsonDocument.Parse("{}").RootElement, "true");
Utilities\AIJsonUtilitiesTests.cs (5)
54JsonElement expected = JsonDocument.Parse(""" 85JsonElement expected = JsonDocument.Parse(""" 130JsonElement expected = JsonDocument.Parse(""" 175JsonElement expected = JsonDocument.Parse(""" 230JsonElement expected = JsonDocument.Parse("""
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
28private static readonly JsonElement _defaultParameterSchema = JsonDocument.Parse("{}").RootElement;
Microsoft.Extensions.AI.Ollama (2)
OllamaChatClient.cs (2)
25private static readonly JsonElement _defaultParameterSchema = JsonDocument.Parse("{}").RootElement; 26private static readonly JsonElement _schemalessJsonResponseFormatValue = JsonDocument.Parse("\"json\"").RootElement;
Microsoft.Extensions.AI.OpenAI (2)
OpenAIModelMapper.ChatCompletion.cs (1)
24private static readonly JsonElement _defaultParameterSchema = JsonDocument.Parse("{}").RootElement;
OpenAIRealtimeExtensions.cs (1)
21private static readonly JsonElement _defaultParameterSchema = JsonDocument.Parse("{}").RootElement;
Microsoft.Extensions.Configuration.Json (1)
JsonConfigurationFileParser.cs (1)
31using (JsonDocument doc = JsonDocument.Parse(reader.ReadToEnd(), jsonDocumentOptions))
Microsoft.JSInterop.Tests (1)
Infrastructure\DotNetDispatcherTest.cs (1)
130var result = JsonDocument.Parse(resultJson);
Negotiate.Client (2)
Controllers\AuthTestController.cs (2)
284var details = JsonDocument.Parse(body).RootElement; 304var details = JsonDocument.Parse(body).RootElement;
OpenIdConnectSample (1)
Startup.cs (1)
264using (var payload = JsonDocument.Parse(await tokenResponse.Content.ReadAsStringAsync()))
Shared.Tests (3)
JsonSchemaExporter\TestTypes.cs (3)
100yield return new TestData<JsonDocument>(JsonDocument.Parse("""[{ "x" : 42 }]"""), "true"); 101yield return new TestData<JsonElement>(JsonDocument.Parse("""[{ "x" : 42 }]""").RootElement, "true"); 117yield return new TestData<JsonElement?>(JsonDocument.Parse("{}").RootElement, "true");
SocialSample (4)
Startup.cs (4)
144using (var user = JsonDocument.Parse(await response.Content.ReadAsStringAsync())) 205using (var user = JsonDocument.Parse(await response.Content.ReadAsStringAsync())) 333using (var payload = JsonDocument.Parse(await refreshResponse.Content.ReadAsStringAsync())) 370using (var payload = JsonDocument.Parse(refreshResponse))