4 instantiations of JsonDocument
System.Text.Json (4)
System\Text\Json\Document\JsonDocument.cs (1)
741new JsonDocument(
System\Text\Json\Document\JsonDocument.Parse.cs (3)
712return new JsonDocument(utf8Json, database, isDisposable: false); 731document = new JsonDocument(utf8Json, database, extraRentedArrayPoolBytes, extraPooledByteBufferWriter, isDisposable: true); 789JsonDocument document = new JsonDocument(utf8Json, database, isDisposable: false);
417 references to JsonDocument
aspire (8)
DotNetCliRunner.cs (6)
23Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 135public async Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 184var json = JsonDocument.Parse(stdout!); 722using var document = JsonDocument.Parse(stdout);
Projects\ProjectLocator.cs (2)
88var json = await JsonDocument.ParseAsync(stream, cancellationToken: cancellationToken);
Aspire.Cli.Tests (2)
TestServices\TestDotNetCliRunner.cs (2)
16public Func<FileInfo, string[], string[], DotNetCliRunnerInvocationOptions, CancellationToken, (int ExitCode, JsonDocument? Output)>? GetProjectItemsAndPropertiesAsyncCallback { get; set; } 53public Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
Aspire.Hosting.PostgreSQL.Tests (2)
AddPostgresTests.cs (2)
483var document = JsonDocument.Parse(serversFile.Contents!);
Aspire.Hosting.Seq.Tests (2)
SeqFunctionalTests.cs (2)
63var jsonDocument = JsonDocument.Parse(reponseContent);
Aspire.Hosting.Tests (3)
Helpers\JsonDocumentManifestPublisher.cs (3)
26_manifestDocument = await JsonDocument.ParseAsync(stream, cancellationToken: cancellationToken).ConfigureAwait(false); 29private JsonDocument? _manifestDocument; 31public JsonDocument ManifestDocument
dotnet-openapi (2)
Commands\BaseCommand.cs (2)
463using var packageVersionDocument = await JsonDocument.ParseAsync(packageVersionStream);
dotnet-user-jwts (2)
Helpers\DevJwtCliHelpers.cs (2)
82var launchSettingsJson = JsonDocument.Parse(launchSettingsFileStream);
JwtBearerSample (2)
Startup.cs (2)
77using (var json = JsonDocument.Parse(body))
Microsoft.AspNetCore.Authentication (1)
JsonDocumentAuthExtensions.cs (1)
9/// Authentication extensions to <see cref="JsonDocument"/>.
Microsoft.AspNetCore.Authentication.Facebook (2)
FacebookHandler.cs (2)
58using (var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted)))
Microsoft.AspNetCore.Authentication.Google (2)
GoogleHandler.cs (2)
56using (var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted)))
Microsoft.AspNetCore.Authentication.MicrosoftAccount (2)
MicrosoftAccountHandler.cs (2)
52using (var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted)))
Microsoft.AspNetCore.Authentication.OAuth (8)
OAuthHandler.cs (4)
227true => OAuthTokenResponse.Success(JsonDocument.Parse(body)), 234var exception = OAuthTokenResponse.GetStandardErrorException(JsonDocument.Parse(body)); 254using (var user = JsonDocument.Parse("{}"))
OAuthTokenResponse.cs (4)
18private OAuthTokenResponse(JsonDocument response) 39public static OAuthTokenResponse Success(JsonDocument response) 63public JsonDocument? Response { get; set; } 93internal static Exception? GetStandardErrorException(JsonDocument response)
Microsoft.AspNetCore.Authentication.OpenIdConnect (8)
Events\UserInformationReceivedContext.cs (1)
32public JsonDocument User { get; set; } = default!;
OpenIdConnectHandler.cs (7)
912using (var payload = JsonDocument.Parse("{}")) 1060JsonDocument user; 1064user = JsonDocument.Parse(userInfoResponse); 1069user = JsonDocument.Parse(userInfoEndpointJwt.Payload.SerializeToJson()); 1085using (var updatedUser = userInformationReceivedContext.User) 1329private async Task<UserInformationReceivedContext> RunUserInformationReceivedEventAsync(ClaimsPrincipal principal, AuthenticationProperties properties, OpenIdConnectMessage message, JsonDocument user)
Microsoft.AspNetCore.Authentication.Test (28)
ClaimActionTests.cs (14)
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 (2)
18using (var document = JsonDocument.Parse(json))
JwtBearerTests.cs (4)
954using var dom = JsonDocument.Parse(responseBody); 998using var dom = JsonDocument.Parse(responseBody);
JwtBearerTests_Handler.cs (4)
898using var dom = JsonDocument.Parse(responseBody); 941using var dom = JsonDocument.Parse(responseBody);
OpenIdConnect\UniqueJsonKeyClaimActionTests.cs (4)
15var userData = JsonDocument.Parse("{ \"jsonKey\": \"value\" }"); 31var userData = JsonDocument.Parse("{ \"jsonKey\": \"value\" }");
Microsoft.AspNetCore.Authentication.Twitter (5)
TwitterHandler.cs (5)
116JsonDocument user; 123user = JsonDocument.Parse("{}"); 320private async Task<JsonDocument> RetrieveUserDetailsAsync(AccessToken accessToken) 333var result = JsonDocument.Parse(responseText);
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
149var res = System.Text.Json.JsonDocument.Parse(await ReceiveMessageLoop(browserDebugClientConnect, token)).RootElement;
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\Json\AnyConverter.cs (2)
23using var d = JsonDocument.ParseValue(ref reader);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (56)
ConverterTests\JsonConverterWriteTests.cs (4)
546using var doc1 = JsonDocument.Parse(jsonNew); 547using var doc2 = JsonDocument.Parse(jsonOld);
ServerStreamingServerCallHandlerTests.cs (14)
68using var responseJson1 = JsonDocument.Parse(line1!); 75using var responseJson2 = JsonDocument.Parse(line2!); 112using var responseJson1 = JsonDocument.Parse(line1!); 116using var responseJson2 = JsonDocument.Parse(line2!); 154using var responseJson1 = JsonDocument.Parse(line1!); 158using var responseJson2 = JsonDocument.Parse(line2!); 195using var responseJson = JsonDocument.Parse(line!);
UnaryServerCallHandlerTests.cs (38)
82using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 120using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 180using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 717using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 749using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 787using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 817using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 841using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 866using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 933using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1011using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1053using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1083using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1112using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1155using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1209using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1236using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1475using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1736using var responseJson = JsonDocument.Parse(httpContext.Response.Body);
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
HttpValidationProblemDetailsJsonConverterTest.cs (2)
34var document = JsonDocument.Parse(ms);
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
Helpers\JsonUtilities.cs (1)
44var docA = JsonSerializer.SerializeToDocument(item, serializerOptions);
Internal\ConversionResultProvider.cs (1)
82using JsonDocument doc = JsonSerializer.SerializeToDocument(value, serializerOptions);
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (2)
IntegrationTests\HeterogenousCollectionTests.cs (2)
91using var doc = JsonDocument.ParseValue(ref reader);
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Infrastructure\DefaultTempDataSerializer.cs (2)
20using var jsonDocument = JsonDocument.Parse(value);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
HttpsTests.cs (1)
162var result = System.Text.Json.JsonDocument.Parse(response).RootElement;
Microsoft.Build (2)
Construction\Solution\SolutionFile.cs (2)
672JsonDocument 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 (2)
EmbeddedLanguages\Json\LanguageServices\JsonLanguageDetector.cs (1)
148options = symbol.ContainingType.Name == nameof(JsonDocument) ? JsonOptions.Strict : default;
PdbSourceDocument\SourceLinkMap.cs (1)
72var root = JsonDocument.Parse(json, new JsonDocumentOptions() { AllowTrailingCommas = true }).RootElement;
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Protocol\Converters\ParameterInformationConverter.cs (2)
18using var document = JsonDocument.ParseValue(ref reader);
Protocol\Converters\SumConverter.cs (2)
205using var document = JsonDocument.ParseValue(ref reader);
Protocol\Internal\Converters\ClassifiedTextRunConverter.cs (1)
19var data = JsonDocument.ParseValue(ref reader).RootElement;
Protocol\Internal\Converters\ObjectContentConverter.cs (2)
48using var jsonDocument = JsonDocument.ParseValue(ref reader);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (6)
UriTests.cs (6)
178var jsonDocument = JsonDocument.Parse(requestJson); 229var jsonDocument = JsonDocument.Parse(requestJson); 275var jsonDocument = JsonDocument.Parse(requestJson);
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\SolutionFileReader.SolutionFilterReader.cs (2)
27using var document = JsonDocument.Parse(File.ReadAllText(filterFilename));
Microsoft.DotNet.Arcade.Sdk (2)
src\InstallDotNetCore.cs (2)
59using (JsonDocument jsonDocument = JsonDocument.Parse(bytes))
Microsoft.Extensions.AI (1)
ChatCompletion\ChatResponse{T}.cs (1)
143if (JsonDocument.Parse(json!).RootElement.TryGetProperty("data", out var data))
Microsoft.Extensions.AI.Abstractions (8)
Functions\AIFunctionFactory.cs (7)
91/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>, 165/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>, 254/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>, 338/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>, 394/// <see cref="JsonDocument"/>, or <see cref="JsonNode"/>, it is deserialized directly. If the argument is anything else unknown, 440/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>, 819JsonDocument doc => JsonSerializer.Deserialize(doc, typeInfo),
Utilities\AIJsonUtilities.Defaults.cs (1)
85[JsonSerializable(typeof(JsonDocument))]
Microsoft.Extensions.AI.Abstractions.Tests (28)
ChatCompletion\ChatResponseFormatTests.cs (1)
12private static JsonElement EmptySchema => JsonDocument.Parse("{}").RootElement;
Contents\FunctionCallContentTests..cs (2)
153var arguments = JsonSerializer.Deserialize<Dictionary<string, JsonDocument>>(""" 195AIFunctionArguments arguments = new(JsonSerializer.Deserialize<Dictionary<string, JsonDocument>>("""
test\Shared\JsonSchemaExporter\TestTypes.cs (5)
104yield return new TestData<JsonDocument>(JsonDocument.Parse("""[{ "x" : 42 }]"""), "true"); 105yield return new TestData<JsonElement>(JsonDocument.Parse("""[{ "x" : 42 }]""").RootElement, "true"); 121yield return new TestData<JsonElement?>(JsonDocument.Parse("{}").RootElement, "true"); 1233[JsonSerializable(typeof(JsonDocument))]
TestJsonSerializerContext.cs (1)
29[JsonSerializable(typeof(Dictionary<string, JsonDocument>))] // Used in Content tests
Utilities\AIJsonSchemaTransformCacheTests.cs (1)
64JsonElement schema = JsonDocument.Parse("{}").RootElement;
Utilities\AIJsonUtilitiesTests.cs (18)
146JsonElement expected = JsonDocument.Parse(""" 176JsonElement expected = JsonDocument.Parse(""" 225JsonElement expected = JsonDocument.Parse(""" 301JsonElement expected = JsonDocument.Parse($$""" 361JsonElement expected = JsonDocument.Parse($$""" 440JsonElement expectedSchema = JsonDocument.Parse(""" 1061JsonElement schema = JsonDocument.Parse(""" 1072JsonElement expectedSchema = JsonDocument.Parse(""" 1095JsonElement schema = JsonDocument.Parse(""" 1106JsonElement expectedSchema = JsonDocument.Parse(""" 1129JsonElement schema = JsonDocument.Parse(""" 1140JsonElement expectedSchema = JsonDocument.Parse(""" 1164JsonElement schema = JsonDocument.Parse(""" 1176JsonElement expectedSchema = JsonDocument.Parse(""" 1201JsonElement schema = JsonDocument.Parse(""" 1209JsonElement expectedSchema = JsonDocument.Parse(""" 1292JsonElement schema = JsonDocument.Parse("{}").RootElement; 1305JsonElement schema = JsonDocument.Parse(invalidSchema).RootElement;
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (1)
SerializationChainingTests.cs (1)
41{ "data", JsonDocument.Parse("{\"some\":\"data\"}").RootElement },
Microsoft.Extensions.AI.Evaluation.Safety (10)
ContentSafetyService.cs (10)
62using JsonDocument annotationResponseDocument = JsonDocument.Parse(annotationResponse); 73using JsonDocument metricDetailsDocument = JsonDocument.Parse(metricDetails); 224using JsonDocument document = JsonDocument.Parse(responseContent); 273using JsonDocument document = JsonDocument.Parse(responseContent); 327using JsonDocument document = JsonDocument.Parse(responseContent);
Microsoft.Extensions.AI.Ollama (3)
OllamaChatClient.cs (1)
26private static readonly JsonElement _schemalessJsonResponseFormatValue = JsonDocument.Parse("\"json\"").RootElement;
OllamaUtilities.cs (2)
57using JsonDocument document = JsonDocument.Parse(errorContent);
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIAIFunctionConversionTests.cs (2)
70using var jsonDoc = JsonDocument.Parse(parameters);
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (2)
38AssertDeepEquals(JsonDocument.Parse(""" 337AssertDeepEquals(JsonDocument.Parse("""
TestJsonSerializerContext.cs (1)
22[JsonSerializable(typeof(Dictionary<string, JsonDocument>))]
Microsoft.Extensions.Configuration.Json (2)
JsonConfigurationFileParser.cs (2)
31using (JsonDocument doc = JsonDocument.Parse(reader.ReadToEnd(), jsonDocumentOptions))
Microsoft.JSInterop.Tests (2)
Infrastructure\DotNetDispatcherTest.cs (2)
131var result = JsonDocument.Parse(resultJson);
Microsoft.ML.Tokenizers.Tests (2)
BpeTests.cs (2)
882using JsonDocument doc = JsonDocument.Parse(json);
Negotiate.Client (2)
Controllers\AuthTestController.cs (2)
284var details = JsonDocument.Parse(body).RootElement; 304var details = JsonDocument.Parse(body).RootElement;
OpenIdConnectSample (2)
Startup.cs (2)
264using (var payload = JsonDocument.Parse(await tokenResponse.Content.ReadAsStringAsync()))
Shared (1)
JsonSchemaExporter\JsonSchemaExporter.cs (1)
628[typeof(JsonDocument)] = _ => JsonSchema.CreateTrueSchema(),
Shared.Tests (5)
JsonSchemaExporter\TestTypes.cs (5)
104yield return new TestData<JsonDocument>(JsonDocument.Parse("""[{ "x" : 42 }]"""), "true"); 105yield return new TestData<JsonElement>(JsonDocument.Parse("""[{ "x" : 42 }]""").RootElement, "true"); 121yield return new TestData<JsonElement?>(JsonDocument.Parse("{}").RootElement, "true"); 1233[JsonSerializable(typeof(JsonDocument))]
SocialSample (9)
Startup.cs (9)
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)) 490private async Task PrintRefreshedTokensAsync(HttpResponse response, JsonDocument payload, AuthenticationProperties authProperties)
System.Text.Json (156)
System\Runtime\InteropServices\JsonMarshal.cs (4)
18/// <exception cref="ObjectDisposedException">The underlying <see cref="JsonDocument"/> has been disposed.</exception> 20/// While the method itself does check for disposal of the underlying <see cref="JsonDocument"/>, 35/// <exception cref="ObjectDisposedException">The underlying <see cref="JsonDocument"/> has been disposed.</exception> 38/// While the method itself does check for disposal of the underlying <see cref="JsonDocument"/>,
System\Text\Json\Document\JsonDocument.cs (4)
102/// The parent <see cref="JsonDocument"/> has been disposed. 740JsonDocument newDocument = 1057private static void ValidateNoDuplicateProperties(JsonDocument document) 1065private static void ValidateDuplicatePropertiesCore(JsonDocument document)
System\Text\Json\Document\JsonDocument.Parse.cs (27)
16private static JsonDocument? s_nullLiteral; 17private static JsonDocument? s_trueLiteral; 18private static JsonDocument? s_falseLiteral; 47public static JsonDocument Parse(ReadOnlyMemory<byte> utf8Json, JsonDocumentOptions options = default) 77public static JsonDocument Parse(ReadOnlySequence<byte> utf8Json, JsonDocumentOptions options = default) 122public static JsonDocument Parse(Stream utf8Json, JsonDocumentOptions options = default) 145internal static JsonDocument ParseRented(PooledByteBufferWriter utf8Json, JsonDocumentOptions options = default) 155internal static JsonDocument ParseValue(Stream utf8Json, JsonDocumentOptions options) 175internal static JsonDocument ParseValue(ReadOnlySpan<byte> utf8Json, JsonDocumentOptions options) 186internal static JsonDocument ParseValue(string json, JsonDocumentOptions options) 208public static Task<JsonDocument> ParseAsync( 218private static async Task<JsonDocument> ParseAsyncCore( 242internal static async Task<JsonDocument> ParseAsyncCoreUnrented( 282public static JsonDocument Parse([StringSyntax(StringSyntaxAttribute.Json)] ReadOnlyMemory<char> json, JsonDocumentOptions options = default) 308internal static JsonDocument ParseValue(ReadOnlySpan<char> json, JsonDocumentOptions options) 349public static JsonDocument Parse([StringSyntax(StringSyntaxAttribute.Json)] string json, JsonDocumentOptions options = default) 394public static bool TryParseValue(ref Utf8JsonReader reader, [NotNullWhen(true)] out JsonDocument? document) 434public static JsonDocument ParseValue(ref Utf8JsonReader reader) => 437internal static JsonDocument ParseValue(ref Utf8JsonReader reader, bool allowDuplicateProperties) 439bool ret = TryParseValue(ref reader, out JsonDocument? document, shouldThrow: true, useArrayPools: true, allowDuplicateProperties); 448[NotNullWhen(true)] out JsonDocument? document, 692private static JsonDocument CreateForLiteral(JsonTokenType tokenType) 708JsonDocument Create(byte[] utf8Json) 716private static JsonDocument Parse( 726JsonDocument document; 753private static JsonDocument ParseUnrented( 789JsonDocument document = new JsonDocument(utf8Json, database, isDisposable: false);
System\Text\Json\Document\JsonDocument.PropertyNameSet.cs (1)
70internal void AddPropertyName(JsonProperty property, JsonDocument document)
System\Text\Json\Document\JsonDocumentOptions.cs (1)
9/// Provides the ability for the user to define custom behavior when parsing JSON to create a <see cref="JsonDocument"/>.
System\Text\Json\Document\JsonElement.ArrayEnumerator.cs (1)
91_curIdx = _target._idx + JsonDocument.DbRow.Size;
System\Text\Json\Document\JsonElement.cs (53)
14/// Represents a specific JSON value within a <see cref="JsonDocument"/>. 19private readonly JsonDocument _parent; 22internal JsonElement(JsonDocument parent, int idx) 45/// The parent <see cref="JsonDocument"/> has been disposed. 60/// The parent <see cref="JsonDocument"/> has been disposed. 80/// The parent <see cref="JsonDocument"/> has been disposed. 97/// The parent <see cref="JsonDocument"/> has been disposed. 131/// The parent <see cref="JsonDocument"/> has been disposed. 171/// The parent <see cref="JsonDocument"/> has been disposed. 210/// The parent <see cref="JsonDocument"/> has been disposed. 250/// The parent <see cref="JsonDocument"/> has been disposed. 285/// The parent <see cref="JsonDocument"/> has been disposed. 321/// The parent <see cref="JsonDocument"/> has been disposed. 342/// The parent <see cref="JsonDocument"/> has been disposed. 373/// The parent <see cref="JsonDocument"/> has been disposed. 398/// The parent <see cref="JsonDocument"/> has been disposed. 421/// The parent <see cref="JsonDocument"/> has been disposed. 449/// The parent <see cref="JsonDocument"/> has been disposed. 470/// The parent <see cref="JsonDocument"/> has been disposed. 498/// The parent <see cref="JsonDocument"/> has been disposed. 521/// The parent <see cref="JsonDocument"/> has been disposed. 548/// The parent <see cref="JsonDocument"/> has been disposed. 568/// The parent <see cref="JsonDocument"/> has been disposed. 595/// The parent <see cref="JsonDocument"/> has been disposed. 619/// The parent <see cref="JsonDocument"/> has been disposed. 647/// The parent <see cref="JsonDocument"/> has been disposed. 667/// The parent <see cref="JsonDocument"/> has been disposed. 694/// The parent <see cref="JsonDocument"/> has been disposed. 718/// The parent <see cref="JsonDocument"/> has been disposed. 746/// The parent <see cref="JsonDocument"/> has been disposed. 769/// The parent <see cref="JsonDocument"/> has been disposed. 796/// The parent <see cref="JsonDocument"/> has been disposed. 820/// The parent <see cref="JsonDocument"/> has been disposed. 857/// The parent <see cref="JsonDocument"/> has been disposed. 888/// The parent <see cref="JsonDocument"/> has been disposed. 924/// The parent <see cref="JsonDocument"/> has been disposed. 955/// The parent <see cref="JsonDocument"/> has been disposed. 982/// The parent <see cref="JsonDocument"/> has been disposed. 1006/// The parent <see cref="JsonDocument"/> has been disposed. 1034/// The parent <see cref="JsonDocument"/> has been disposed. 1057/// The parent <see cref="JsonDocument"/> has been disposed. 1085/// The parent <see cref="JsonDocument"/> has been disposed. 1108/// The parent <see cref="JsonDocument"/> has been disposed. 1136/// The parent <see cref="JsonDocument"/> has been disposed. 1159/// The parent <see cref="JsonDocument"/> has been disposed. 1193/// The parent <see cref="JsonDocument"/> has been disposed. 1543/// The parent <see cref="JsonDocument"/> has been disposed. 1571/// The parent <see cref="JsonDocument"/> has been disposed. 1597/// The parent <see cref="JsonDocument"/> has been disposed. 1618/// For JsonElement built from <see cref="JsonDocument"/>: 1645/// The parent <see cref="JsonDocument"/> has been disposed. 1679/// original <see cref="JsonDocument"/>. 1683/// original <see cref="JsonDocument"/>.
System\Text\Json\Document\JsonElement.ObjectEnumerator.cs (2)
96_curIdx = _target._idx + JsonDocument.DbRow.Size; 104_curIdx += JsonDocument.DbRow.Size;
System\Text\Json\Document\JsonElement.Parse.cs (14)
49bool ret = JsonDocument.TryParseValue(ref reader, out JsonDocument? document, shouldThrow: true, useArrayPools: false); 58bool ret = JsonDocument.TryParseValue( 60out JsonDocument? document, 72JsonDocument document = JsonDocument.ParseValue(utf8Json, options); 86JsonDocument document = JsonDocument.ParseValue(utf8Json, options); 100JsonDocument document = JsonDocument.ParseValue(json, options); 117JsonDocument document = JsonDocument.ParseValue(json, options); 161bool ret = JsonDocument.TryParseValue(ref reader, out JsonDocument? document, shouldThrow: false, useArrayPools: false);
System\Text\Json\Document\JsonProperty.cs (1)
113/// The parent <see cref="JsonDocument"/> has been disposed.
System\Text\Json\Nodes\JsonNode.Parse.cs (2)
148JsonDocument document = await JsonDocument.ParseAsyncCoreUnrented(utf8Json, documentOptions, cancellationToken).ConfigureAwait(false);
System\Text\Json\Nodes\JsonValue.cs (4)
114JsonElement thisElement = ToJsonElement(this, out JsonDocument? thisDocument); 115JsonElement otherElement = ToJsonElement(otherNode, out JsonDocument? otherDocument); 126static JsonElement ToJsonElement(JsonNode node, out JsonDocument? backingDocument) 144backingDocument = JsonDocument.ParseValue(ref reader);
System\Text\Json\Serialization\Converters\Value\JsonDocumentConverter.cs (4)
9internal sealed class JsonDocumentConverter : JsonConverter<JsonDocument?> 13public override JsonDocument Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => 14JsonDocument.ParseValue(ref reader, options.AllowDuplicateProperties); 16public override void Write(Utf8JsonWriter writer, JsonDocument? value, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonSerializer.Read.Document.cs (15)
13/// Converts the <see cref="JsonDocument"/> representing a single JSON value into a <typeparamref name="TValue"/>. 17/// <param name="document">The <see cref="JsonDocument"/> to convert.</param> 31public static TValue? Deserialize<TValue>(this JsonDocument document, JsonSerializerOptions? options = null) 41/// Converts the <see cref="JsonDocument"/> representing a single JSON value into a <paramref name="returnType"/>. 44/// <param name="document">The <see cref="JsonDocument"/> to convert.</param> 59public static object? Deserialize(this JsonDocument document, Type returnType, JsonSerializerOptions? options = null) 70/// Converts the <see cref="JsonDocument"/> representing a single JSON value into a <typeparamref name="TValue"/>. 74/// <param name="document">The <see cref="JsonDocument"/> to convert.</param> 86public static TValue? Deserialize<TValue>(this JsonDocument document, JsonTypeInfo<TValue> jsonTypeInfo) 97/// Converts the <see cref="JsonDocument"/> representing a single JSON value into an instance specified by the <paramref name="jsonTypeInfo"/>. 99/// <param name="document">The <see cref="JsonDocument"/> to convert.</param> 109public static object? Deserialize(this JsonDocument document, JsonTypeInfo jsonTypeInfo) 120/// Converts the <see cref="JsonDocument"/> representing a single JSON value into a <paramref name="returnType"/>. 123/// <param name="document">The <see cref="JsonDocument"/> to convert.</param> 155public static object? Deserialize(this JsonDocument document, Type returnType, JsonSerializerContext context)
System\Text\Json\Serialization\JsonSerializer.Write.Document.cs (19)
14/// Converts the provided value into a <see cref="JsonDocument"/>. 17/// <returns>A <see cref="JsonDocument"/> representation of the JSON value.</returns> 26public static JsonDocument SerializeToDocument<TValue>(TValue value, JsonSerializerOptions? options = null) 33/// Converts the provided value into a <see cref="JsonDocument"/>. 35/// <returns>A <see cref="JsonDocument"/> representation of the value.</returns> 51public static JsonDocument SerializeToDocument(object? value, Type inputType, JsonSerializerOptions? options = null) 59/// Converts the provided value into a <see cref="JsonDocument"/>. 62/// <returns>A <see cref="JsonDocument"/> representation of the value.</returns> 68public static JsonDocument SerializeToDocument<TValue>(TValue value, JsonTypeInfo<TValue> jsonTypeInfo) 77/// Converts the provided value into a <see cref="JsonDocument"/>. 79/// <returns>A <see cref="JsonDocument"/> representation of the value.</returns> 88public static JsonDocument SerializeToDocument(object? value, JsonTypeInfo jsonTypeInfo) 97/// Converts the provided value into a <see cref="JsonDocument"/>. 99/// <returns>A <see cref="JsonDocument"/> representation of the value.</returns> 114public static JsonDocument SerializeToDocument(object? value, Type inputType, JsonSerializerContext context) 122private static JsonDocument WriteDocument<TValue>(in TValue value, JsonTypeInfo<TValue> jsonTypeInfo) 135return JsonDocument.ParseRented(output, options.GetDocumentOptions()); 143private static JsonDocument WriteDocumentAsObject(object? value, JsonTypeInfo jsonTypeInfo) 156return JsonDocument.ParseRented(output, options.GetDocumentOptions());
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (3)
164/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="JsonDocument"/> values. 167public static JsonConverter<JsonDocument?> JsonDocumentConverter => s_jsonDocumentConverter ??= new JsonDocumentConverter(); 168private static JsonConverter<JsonDocument?>? s_jsonDocumentConverter;
System\Text\Json\ThrowHelper.cs (1)
756throw new ObjectDisposedException(nameof(JsonDocument));
Templates.Blazor.Tests (2)
src\ProjectTemplates\Shared\Project.cs (2)
319using var launchSettings = await JsonDocument.ParseAsync(launchSettingsFile);
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\ProjectTemplates\Shared\Project.cs (2)
319using var launchSettings = await JsonDocument.ParseAsync(launchSettingsFile);
Templates.Blazor.WebAssembly.Tests (2)
src\ProjectTemplates\Shared\Project.cs (2)
319using var launchSettings = await JsonDocument.ParseAsync(launchSettingsFile);
Templates.Mvc.Tests (2)
src\ProjectTemplates\Shared\Project.cs (2)
319using var launchSettings = await JsonDocument.ParseAsync(launchSettingsFile);
Templates.Tests (2)
src\ProjectTemplates\Shared\Project.cs (2)
319using var launchSettings = await JsonDocument.ParseAsync(launchSettingsFile);