4 instantiations of JsonDocument
System.Text.Json (4)
System\Text\Json\Document\JsonDocument.cs (1)
783new JsonDocument(
System\Text\Json\Document\JsonDocument.Parse.cs (3)
683return new JsonDocument(utf8Json, database, isDisposable: false); 711return new JsonDocument(utf8Json, database, extraRentedArrayPoolBytes, extraPooledByteBufferWriter); 749return new JsonDocument(utf8Json, database, isDisposable: false);
406 references to JsonDocument
aspire (10)
DotNetCliRunner.cs (8)
20Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 72var json = JsonDocument.Parse(stdout); 103public async Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 152var json = JsonDocument.Parse(stdout!); 662var document = JsonDocument.Parse(stdout);
Projects\ProjectLocator.cs (2)
64var 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)
488var document = JsonDocument.Parse(serversFile.Contents!);
Aspire.Hosting.Seq.Tests (2)
SeqFunctionalTests.cs (2)
60var 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)
148var 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)
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!);
UnaryServerCallHandlerTests.cs (38)
81using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 119using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 179using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 716using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 748using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 786using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 816using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 840using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 865using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 932using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1010using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1052using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1082using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1111using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1154using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1208using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1235using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1474using var responseJson = JsonDocument.Parse(httpContext.Response.Body); 1735using 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 (9)
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\ImageIdConverter.cs (2)
19using var document = JsonDocument.ParseValue(ref reader);
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\MSBuildProjectLoader.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 (8)
ChatCompletion\ChatResponse{T}.cs (1)
143if (JsonDocument.Parse(json!).RootElement.TryGetProperty("data", out var data))
Functions\AIFunctionFactory.cs (7)
105/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>, 196/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>, 304/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>, 405/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>, 463/// <see cref="JsonDocument"/>, or <see cref="JsonNode"/>, it is deserialized directly. If the argument is anything else unknown, 528/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>, 977JsonDocument doc => JsonSerializer.Deserialize(doc, typeInfo),
Microsoft.Extensions.AI.Abstractions (2)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (1)
628[typeof(JsonDocument)] = _ => JsonSchema.CreateTrueSchema(),
Utilities\AIJsonUtilities.Defaults.cs (1)
85[JsonSerializable(typeof(JsonDocument))]
Microsoft.Extensions.AI.Abstractions.Tests (26)
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 (16)
137JsonElement expected = JsonDocument.Parse(""" 168JsonElement expected = JsonDocument.Parse(""" 212JsonElement expected = JsonDocument.Parse(""" 257JsonElement expected = JsonDocument.Parse(""" 328JsonElement expected = JsonDocument.Parse($$""" 385JsonElement expected = JsonDocument.Parse($$""" 572JsonElement schema = JsonDocument.Parse(""" 583JsonElement expectedSchema = JsonDocument.Parse(""" 606JsonElement schema = JsonDocument.Parse(""" 617JsonElement expectedSchema = JsonDocument.Parse(""" 640JsonElement schema = JsonDocument.Parse(""" 651JsonElement expectedSchema = JsonDocument.Parse(""" 675JsonElement schema = JsonDocument.Parse(""" 687JsonElement expectedSchema = JsonDocument.Parse(""" 776JsonElement schema = JsonDocument.Parse("{}").RootElement; 789JsonElement 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.Tests (1)
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 (146)
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 (2)
102/// The parent <see cref="JsonDocument"/> has been disposed. 782JsonDocument newDocument =
System\Text\Json\Document\JsonDocument.Parse.cs (24)
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) 118public static JsonDocument Parse(Stream utf8Json, JsonDocumentOptions options = default) 137internal static JsonDocument ParseRented(PooledByteBufferWriter utf8Json, JsonDocumentOptions options = default) 146internal static JsonDocument ParseValue(Stream utf8Json, JsonDocumentOptions options) 163internal static JsonDocument ParseValue(ReadOnlySpan<byte> utf8Json, JsonDocumentOptions options) 171internal static JsonDocument ParseValue(string json, JsonDocumentOptions options) 193public static Task<JsonDocument> ParseAsync( 203private static async Task<JsonDocument> ParseAsyncCore( 223internal static async Task<JsonDocument> ParseAsyncCoreUnrented( 260public static JsonDocument Parse([StringSyntax(StringSyntaxAttribute.Json)] ReadOnlyMemory<char> json, JsonDocumentOptions options = default) 285internal static JsonDocument ParseValue(ReadOnlyMemory<char> json, JsonDocumentOptions options) 324public static JsonDocument Parse([StringSyntax(StringSyntaxAttribute.Json)] string json, JsonDocumentOptions options = default) 369public static bool TryParseValue(ref Utf8JsonReader reader, [NotNullWhen(true)] out JsonDocument? document) 409public static JsonDocument ParseValue(ref Utf8JsonReader reader) 411bool ret = TryParseValue(ref reader, out JsonDocument? document, shouldThrow: true, useArrayPools: true); 420[NotNullWhen(true)] out JsonDocument? document, 663private static JsonDocument CreateForLiteral(JsonTokenType tokenType) 679JsonDocument Create(byte[] utf8Json) 687private static JsonDocument Parse( 714private static JsonDocument ParseUnrented(
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 (10)
49bool ret = JsonDocument.TryParseValue(ref reader, out JsonDocument? document, shouldThrow: true, useArrayPools: false); 58JsonDocument document = JsonDocument.ParseValue(utf8Json, options); 64JsonDocument document = JsonDocument.ParseValue(utf8Json, options); 70JsonDocument document = JsonDocument.ParseValue(json, options); 114bool 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) 15return JsonDocument.ParseValue(ref reader); 18public 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);