1 type derived from JsonException
System.Text.Json (1)
System\Text\Json\Reader\JsonReaderException.cs (1)
10internal sealed class JsonReaderException : JsonException
128 instantiations of JsonException
Microsoft.AspNetCore.Components.Server (3)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (3)
34throw new JsonException($"Unexpected JSON property '{reader.GetString()}'."); 39throw new JsonException($"Unexpected JSON Token {reader.TokenType}."); 45throw new JsonException("__internalId is required.");
Microsoft.AspNetCore.Components.Web (13)
WebEventData\ChangeEventArgsReader.cs (1)
43throw new JsonException($"Unknown property {property.Name}");
WebEventData\ClipboardEventArgsReader.cs (1)
25throw new JsonException($"Unknown property {property.Name}");
WebEventData\DragEventArgsReader.cs (2)
73throw new JsonException($"Unknown property {property.Name}"); 95throw new JsonException($"Unknown property {property.Name}");
WebEventData\ErrorEventArgsReader.cs (1)
45throw new JsonException($"Unknown property {property.Name}");
WebEventData\FocusEventArgsReader.cs (1)
25throw new JsonException($"Unknown property {property.Name}");
WebEventData\KeyboardEventArgsReader.cs (1)
70throw new JsonException($"Unknown property {property.Name}");
WebEventData\MouseEventArgsReader.cs (1)
117throw new JsonException($"Unknown property {property.Name}");
WebEventData\ProgressEventArgReader.cs (1)
40throw new JsonException($"Unknown property {property.Name}");
WebEventData\TouchEventArgsReader.cs (2)
72throw new JsonException($"Unknown property {property.Name}"); 126throw new JsonException($"Unknown property {property.Name}");
WebEventData\WebEventDescriptorReader.cs (2)
38throw new JsonException($"Unknown property {property.Name}"); 72throw new JsonException($"Unknown property {property.Name}");
Microsoft.AspNetCore.Components.WebAssembly (3)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (3)
34throw new JsonException($"Unexpected JSON property '{reader.GetString()}'."); 39throw new JsonException($"Unexpected JSON Token {reader.TokenType}."); 45throw new JsonException("__internalId is required.");
Microsoft.AspNetCore.Components.WebView (3)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (3)
34throw new JsonException($"Unexpected JSON property '{reader.GetString()}'."); 39throw new JsonException($"Unexpected JSON Token {reader.TokenType}."); 45throw new JsonException("__internalId is required.");
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (2)
ConverterTests\JsonElementComparer.cs (2)
95throw new JsonException(string.Format(CultureInfo.InvariantCulture, "Unknown JsonValueKind {0}", x.ValueKind)); 153throw new JsonException(string.Format(CultureInfo.InvariantCulture, "Unknown JsonValueKind {0}", obj.ValueKind));
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (2)
514var jsonException = new JsonException(); 555var jsonException = new JsonException();
Microsoft.AspNetCore.JsonPatch.SystemTextJson (4)
Converters\JsonConverterForJsonPatchDocumentOfT.cs (2)
27throw new JsonException(Resources.InvalidJsonPatchDocument); 49throw new JsonException(Resources.InvalidJsonPatchDocument, ex);
Converters\JsonPatchDocumentConverter.cs (2)
26throw new JsonException(Resources.InvalidJsonPatchDocument); 49throw new JsonException(Resources.InvalidJsonPatchDocument, ex);
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (6)
IntegrationTests\HeterogenousCollectionTests.cs (3)
88throw new JsonException(); 104throw new JsonException("Unknown shape type"); 120throw new JsonException("Unknown shape type");
TestObjectModels\HeterogenousCollection.cs (3)
79throw new JsonException(); 93throw new JsonException(); 109throw new JsonException();
Microsoft.AspNetCore.OpenApi (6)
Schemas\OpenApiJsonSchema.cs (3)
23throw new JsonException("Expected StartObject token to represent beginning of schema."); 31var propertyName = reader.GetString() ?? throw new JsonException("Encountered unexpected missing property name."); 41throw new JsonException("Encountered unexpected EOF token without producing a schema.");
Schemas\OpenApiJsonSchema.Helpers.cs (3)
68throw new JsonException("Expected StartObject or Null"); 77throw new JsonException("Expected PropertyName"); 162throw new JsonException("Expected PropertyName");
Microsoft.CodeAnalysis.LanguageServer.Protocol (25)
Protocol\Converters\FormattingOptionsConverter.cs (4)
31throw new JsonException(LanguageServerProtocolResources.FormattingOptionsEndedUnexpectedly); 40throw new JsonException(string.Format(CultureInfo.InvariantCulture, LanguageServerProtocolResources.FormattingOptionsMissingRequiredProperty, propertyName)); 74throw new JsonException(string.Format(CultureInfo.InvariantCulture, LanguageServerProtocolResources.FormattingOptionsEncounteredInvalidToken, reader.TokenType)); 108_ => throw new JsonException(string.Format(CultureInfo.InvariantCulture, LanguageServerProtocolResources.FormattingOptionsEncounteredInvalidToken, reader.TokenType))
Protocol\Converters\NaturalObjectConverter.cs (1)
70throw new JsonException();
Protocol\Converters\StringEnumConverter.cs (1)
49throw new JsonException(string.Format(CultureInfo.InvariantCulture, LanguageServerProtocolResources.StringEnumSerializationError, reader.GetString()));
Protocol\Converters\SumConverter.cs (2)
215throw new JsonException(LanguageServerProtocolResources.NoSumTypeMatch); 254throw new JsonException($"No sum type match for {objectType}");
Protocol\Converters\TextDocumentSyncConverter.cs (1)
41throw new JsonException(string.Format(CultureInfo.InvariantCulture, LanguageServerProtocolResources.TextDocumentSyncSerializationError, reader.GetString()));
Protocol\Internal\Converters\ClassifiedTextElementConverter.cs (2)
45throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ClassifiedTextElement)}"); 54throw new JsonException();
Protocol\Internal\Converters\ClassifiedTextRunConverter.cs (4)
22throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ClassifiedTextRun)}"); 33throw new JsonException("Expected start object or null tokens"); 47throw new JsonException(); 53throw new JsonException();
Protocol\Internal\Converters\ContainerElementConverter.cs (3)
30return new ContainerElement(style ?? throw new JsonException(), objects); 54throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ContainerElement)}"); 64throw new JsonException();
Protocol\Internal\Converters\ImageElementConverter.cs (3)
27imageId ??= imageId ?? throw new JsonException(); 45throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ImageElement)}"); 55throw new JsonException("Expected start object or null tokens");
Protocol\Internal\Converters\ImageIdConverter.cs (3)
23throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ImageId)}"); 26var guid = root.GetProperty(nameof(ImageId.Guid)).GetString() ?? throw new JsonException(); 32throw new JsonException("Expected start object or null tokens");
Protocol\Internal\Converters\ObjectContentConverter.cs (1)
50var type = data.GetProperty(TypeProperty).GetString() ?? throw new JsonException();
Microsoft.Extensions.AI.Abstractions (2)
Embeddings\BinaryEmbedding.cs (2)
52throw new JsonException("Expected string property."); 77_ => throw new JsonException("Expected binary character sequence.")
Microsoft.Extensions.AI.Evaluation.Reporting (8)
JsonSerialization\EvaluationContextConverter.cs (5)
27throw new JsonException($"Unexpected token '{reader.TokenType}'."); 45throw new JsonException( 54throw new JsonException( 64throw new JsonException( 77throw new JsonException($"Missing required properties '{NamePropertyName}' and '{ContentsPropertyName}'.");
Storage\DiskBasedResponseCache.CacheEntry.cs (2)
44throw new JsonException( 61throw new JsonException(
Storage\DiskBasedResultStore.cs (1)
75? throw new JsonException(
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (8)
src\Libraries\Microsoft.Extensions.AI.Evaluation.Reporting\CSharp\JsonSerialization\EvaluationContextConverter.cs (5)
27throw new JsonException($"Unexpected token '{reader.TokenType}'."); 45throw new JsonException( 54throw new JsonException( 64throw new JsonException( 77throw new JsonException($"Missing required properties '{NamePropertyName}' and '{ContentsPropertyName}'.");
Storage\AzureStorageResponseCache.CacheEntry.cs (2)
49?? throw new JsonException( 67?? throw new JsonException(
Storage\AzureStorageResultStore.cs (1)
119?? throw new JsonException(
Microsoft.JSInterop (22)
Implementation\JSObjectReferenceJsonWorker.cs (3)
38throw new JsonException($"Unexpected JSON property {reader.GetString()}."); 43throw new JsonException($"Unexpected JSON token {reader.TokenType}"); 49throw new JsonException($"Required property {JSObjectIdKey} not found.");
Infrastructure\ByteArrayJsonConverter.cs (8)
33throw new JsonException("JSON serialization is attempting to deserialize an unexpected byte array."); 40throw new JsonException($"Unexpected JSON Token {reader.TokenType}, expected 'StartObject'."); 47throw new JsonException($"Unexpected JSON Property {reader.GetString()}."); 51throw new JsonException($"Unexpected JSON Token {reader.TokenType}, expected 'Number'."); 55throw new JsonException($"Unexpected number, expected 32-bit integer."); 60throw new JsonException($"Unexpected JSON Token {reader.TokenType}, expected 'PropertyName'."); 65throw new JsonException($"Unexpected JSON Token {reader.TokenType}, expected 'EndObject'."); 70throw new JsonException($"Byte array {byteArrayRef} not found.");
Infrastructure\DotNetDispatcher.cs (4)
232throw new JsonException("Invalid JSON"); 259throw new JsonException($"Unexpected JSON token {reader.TokenType}. Ensure that the call to `{methodIdentifier}' is supplied with exactly '{parameterTypes.Length}' parameters."); 319throw new JsonException("Invalid JSON"); 336throw new JsonException("Invalid JSON");
Infrastructure\DotNetObjectReferenceJsonConverter.cs (3)
37throw new JsonException($"Unexpected JSON property {reader.GetString()}."); 42throw new JsonException($"Unexpected JSON Token {reader.TokenType}."); 48throw new JsonException($"Required property {DotNetObjectRefKey} not found.");
Infrastructure\JSStreamReferenceJsonConverter.cs (4)
45throw new JsonException($"Unexpected JSON property {reader.GetString()}."); 50throw new JsonException($"Unexpected JSON token {reader.TokenType}"); 56throw new JsonException($"Required property {JSObjectReferenceJsonWorker.JSObjectIdKey} not found."); 61throw new JsonException($"Required property {_jsStreamReferenceLengthKey} not found.");
Microsoft.ML.Tokenizers (1)
Utils\StringSpanOrdinalKey.cs (1)
166throw new JsonException("Invalid JSON.");
Roslyn.VisualStudio.Next.UnitTests (2)
UnifiedSettings\TestModel\ResourceStringArrayConverter.cs (2)
17throw new JsonException("Expected StartArray token"); 32throw new JsonException("Token should be string");
System.Text.Json (14)
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
56throw new JsonException();
System\Text\Json\ThrowHelper.Serialization.cs (13)
52throw new JsonException(SR.Format(SR.DeserializeUnableToConvertValue, propertyType)) { AppendPathInformation = true }; 70throw new JsonException(SR.Format(SR.PropertyGetterDisallowNull, propertyName, declaringType)) { AppendPathInformation = true }; 76throw new JsonException(SR.Format(SR.PropertySetterDisallowNull, propertyName, declaringType)) { AppendPathInformation = true }; 82throw new JsonException(SR.Format(SR.ConstructorParameterDisallowNull, parameterName, declaringType)) { AppendPathInformation = true }; 130throw new JsonException(SR.Format(SR.SerializationConverterRead, converter)) { AppendPathInformation = true }; 136throw new JsonException(SR.Format(SR.SerializationConverterWrite, converter)) { AppendPathInformation = true }; 142throw new JsonException(SR.Format(SR.SerializerCycleDetected, maxDepth)) { AppendPathInformation = true }; 148throw new JsonException(message) { AppendPathInformation = true }; 323throw new JsonException(SR.Format(SR.JsonRequiredPropertiesMissing, parent.Type, listOfMissingPropertiesBuilder.ToString())); 452throw new JsonException(message, path, ex.LineNumber, ex.BytePositionInLine, ex); 458JsonException jsonException = new JsonException(null, ex); 496JsonException jsonException = new JsonException(null, ex); 696throw new JsonException(SR.Format(SR.UnmappedJsonProperty, unmappedPropertyName, type));
System.Windows.Forms.Tests (4)
System\Windows\Forms\DataObjectTests.cs (4)
3032throw new JsonException(); 3041throw new JsonException(); 3066throw new JsonException(); 3070throw new JsonException();
189 references to JsonException
aspire (1)
DotNetCliRunner.cs (1)
701catch (JsonException ex)
Aspire.Dashboard (1)
Components\Dialogs\TextVisualizerDialog.razor.cs (1)
158catch (JsonException)
Aspire.Hosting (2)
Dashboard\DashboardLifecycleHook.cs (1)
418catch (JsonException)
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
100catch (JsonException ex)
Aspire.Hosting.Azure (2)
Provisioning\Provisioners\AzureProvisioner.cs (2)
242catch (JsonException ex) 334catch (JsonException ex)
Aspire.Hosting.Azure.Functions (1)
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
100catch (JsonException ex)
Aspire.Hosting.Testing (1)
DistributedApplicationFactory.cs (1)
364catch (JsonException ex)
Microsoft.AspNetCore.Components.Server.Tests (6)
ElementReferenceJsonConverterTest.cs (4)
84var ex = Assert.Throws<JsonException>(() => 103var ex = Assert.Throws<JsonException>(() =>
ProtectedBrowserStorageTest.cs (2)
177var ex = await Assert.ThrowsAsync<JsonException>(
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonRequestHelpers.cs (1)
306catch (JsonException ex)
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
ProblemDetailsJsonConverterTest.cs (1)
28Assert.IsAssignableFrom<JsonException>(ex);
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
1410catch (JsonException ex)
Microsoft.AspNetCore.Http.Extensions.Tests (6)
HttpRequestJsonExtensionsTests.cs (2)
57var ex = await Assert.ThrowsAsync<JsonException>(async () => await context.Request.ReadFromJsonAsync<int>());
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (4)
514var jsonException = new JsonException(); 555var jsonException = new JsonException(); 613Assert.IsType<JsonException>(logMessage.Exception); 655Assert.IsType<JsonException>(badHttpRequestException.InnerException);
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (4)
JsonPatchDocumentTest.cs (4)
174var exception = Assert.Throws<JsonException>(() => 191var exception = Assert.Throws<JsonException>(() =>
Microsoft.AspNetCore.Mvc.Core (2)
Formatters\SystemTextJsonInputFormatter.cs (2)
68catch (JsonException jsonException) 113private Exception WrapExceptionForModelState(JsonException jsonException)
Microsoft.AspNetCore.OpenApi (1)
Schemas\OpenApiJsonSchema.Helpers.cs (1)
58/// <exception cref="JsonException">Thrown if JSON object is not valid.</exception>
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Protocol\JsonHubProtocol.cs (2)
417catch (JsonException ex) 475catch (JsonException jrex)
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTests.cs (2)
3832Assert.IsType<System.Text.Json.JsonException>(state.DisconnectedException); 3855Assert.IsType<System.Text.Json.JsonException>(state.DisconnectedException);
Microsoft.Build (2)
Construction\Solution\SolutionFile.cs (2)
654catch (Exception e) when (e is JsonException || e is KeyNotFoundException || e is InvalidOperationException) 677catch (Exception e) when (e is JsonException || e is KeyNotFoundException || e is InvalidOperationException)
Microsoft.CodeAnalysis.Features (1)
PdbSourceDocument\SourceLinkMap.cs (1)
62/// <exception cref="JsonException"><paramref name="json"/> is not valid JSON string.</exception>
Microsoft.CodeAnalysis.LanguageServer (1)
FileBasedPrograms\VirtualProjectXmlProvider.cs (1)
85catch (JsonException ex)
Microsoft.Extensions.AI.Abstractions (5)
Functions\AIFunctionFactory.cs (5)
109/// <exception cref="JsonException">A parameter to <paramref name="method"/> is not serializable.</exception> 182/// <exception cref="JsonException">A parameter to <paramref name="method"/> is not serializable.</exception> 275/// <exception cref="JsonException">A parameter to <paramref name="method"/> or its return type is not serializable.</exception> 358/// <exception cref="JsonException">A parameter to <paramref name="method"/> or its return type is not serializable.</exception> 462/// <exception cref="JsonException">A parameter to <paramref name="method"/> or its return type is not serializable.</exception>
Microsoft.Extensions.AI.Abstractions.Tests (2)
Contents\FunctionCallContentTests..cs (1)
300[InlineData(typeof(JsonException))]
Embeddings\BinaryEmbeddingTests.cs (1)
93Assert.Throws<JsonException>(() => JsonSerializer.Deserialize(json, TestJsonSerializerContext.Default.Embedding));
Microsoft.Extensions.AI.Evaluation.Quality (2)
RelevanceTruthAndCompletenessEvaluator.cs (2)
289catch (JsonException) 314catch (JsonException ex)
Microsoft.Extensions.AI.Evaluation.Tests (1)
RelevanceTruthAndCompletenessEvaluatorRatingTests.cs (1)
146Assert.Throws<JsonException>(() => RelevanceTruthAndCompletenessEvaluator.Rating.FromJson(json));
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
126catch (JsonException)
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (2)
210var ex = Assert.Throws<JsonException>(() => response.Result);
Microsoft.Extensions.Configuration.Json (1)
JsonConfigurationProvider.cs (1)
32catch (JsonException e)
Microsoft.JSInterop.Tests (48)
Infrastructure\ByteArrayJsonConverterTest.cs (17)
25var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<byte[]>(json, JsonSerializerOptions)); 38var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<byte[]>(json, JsonSerializerOptions)); 51var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<byte[]>(json, JsonSerializerOptions)); 65Assert.IsAssignableFrom<JsonException>(ex); 89var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<byte[]>(json, JsonSerializerOptions)); 121var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<byte[]>(json, JsonSerializerOptions)); 137var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<byte[]>(json, JsonSerializerOptions)); 153var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<byte[]>(json, JsonSerializerOptions)); 169var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<byte[]>(json, JsonSerializerOptions));
Infrastructure\DotNetDispatcherTest.cs (10)
346Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, "")); 357Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, $"{{\"key\": \"{jsRuntime.LastInvocationAsyncHandle}\"}}")); 368Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, $"[{jsRuntime.LastInvocationAsyncHandle}, false")); 379Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, $"[{jsRuntime.LastInvocationAsyncHandle}, false, \"Hello\", 5]")); 572Assert.Throws<JsonException>(() => 611var ex = Assert.Throws<JsonException>(() => 795Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.ParseArguments(new TestJSRuntime(), "SomeMethod", arguments, new[] { typeof(string) })); 804Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.ParseArguments(new TestJSRuntime(), "SomeMethod", arguments, new[] { typeof(string) })); 813Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.ParseArguments(new TestJSRuntime(), "SomeMethod", arguments, new[] { typeof(string) }));
Infrastructure\DotNetObjectReferenceJsonConverterTest.cs (6)
23var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<DotNetObjectReference<TestModel>>(json, JsonSerializerOptions)); 37var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<DotNetObjectReference<TestModel>>(json, JsonSerializerOptions)); 53Assert.IsAssignableFrom<JsonException>(ex); 68Assert.IsAssignableFrom<JsonException>(ex);
Infrastructure\JSObjectReferenceJsonConverterTest.cs (6)
27var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSObjectReference>(json, JsonSerializerOptions)); 38var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSObjectReference>(json, JsonSerializerOptions)); 50Assert.IsAssignableFrom<JsonException>(ex); 61Assert.IsAssignableFrom<JsonException>(ex);
Infrastructure\JSStreamReferenceJsonConverterTest.cs (8)
27var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions)); 38var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions)); 50Assert.IsAssignableFrom<JsonException>(ex); 61Assert.IsAssignableFrom<JsonException>(ex); 72var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions));
JSRuntimeTest.cs (1)
232Assert.IsAssignableFrom<JsonException>(jsException.InnerException);
Roslyn.VisualStudio.Next.UnitTests (1)
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (1)
380Assert.IsType<JsonException>(result.ExtensionException);
System.Text.Json (88)
src\libraries\System.Text.Json\Common\JsonCommentHandling.cs (1)
14/// <see cref="JsonException"/> is thrown.
System\Text\Json\Document\JsonDocument.Parse.cs (8)
41/// <exception cref="JsonException"> 71/// <exception cref="JsonException"> 112/// <exception cref="JsonException"> 187/// <exception cref="JsonException"> 254/// <exception cref="JsonException"> 318/// <exception cref="JsonException"> 366/// <exception cref="JsonException"> 406/// <exception cref="JsonException">
System\Text\Json\Document\JsonDocumentOptions.cs (3)
25/// By default <exception cref="JsonException"/> is thrown if a comment is encountered. 47/// Reading past this depth will throw a <exception cref="JsonException"/>. 68/// By default, it's set to false, and <exception cref="JsonException"/> is thrown if a trailing comma is encountered.
System\Text\Json\Document\JsonElement.Parse.cs (2)
44/// <exception cref="JsonException"> 109/// <exception cref="JsonException">
System\Text\Json\Nodes\JsonNode.Parse.cs (5)
44/// <exception cref="JsonException"> 67/// <exception cref="JsonException"> 90/// <exception cref="JsonException"> 112/// <exception cref="JsonException"> 137/// <exception cref="JsonException">
System\Text\Json\Reader\JsonReaderOptions.cs (4)
25/// By default <exception cref="JsonException"/> is thrown if a comment is encountered. 49/// Reading past this depth will throw a <exception cref="JsonException"/>. 70/// By default, it's set to false, and <exception cref="JsonException"/> is thrown if a trailing comma is encountered. 79/// By default, it's set to false, and <exception cref="JsonException"/> is thrown if trailing content is encountered after the first top-level JSON value.
System\Text\Json\Reader\Utf8JsonReader.cs (3)
274/// <exception cref="JsonException"> 298/// <exception cref="JsonException"> 352/// <exception cref="JsonException">
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (1)
650private JsonException GetInvalidLiteralMultiSegment(ReadOnlySpan<byte> span)
System\Text\Json\Serialization\JsonConverterOfT.ReadCore.cs (1)
74case JsonException jsonEx when jsonEx.Path is null:
System\Text\Json\Serialization\JsonConverterOfT.WriteCore.cs (1)
33case JsonException { Path: null } jsonException:
System\Text\Json\Serialization\JsonSerializer.Read.Document.cs (4)
22/// <exception cref="JsonException"> 50/// <exception cref="JsonException"> 83/// <exception cref="JsonException"> 137/// <exception cref="JsonException">
System\Text\Json\Serialization\JsonSerializer.Read.Element.cs (4)
19/// <exception cref="JsonException"> 45/// <exception cref="JsonException"> 73/// <exception cref="JsonException"> 121/// <exception cref="JsonException">
System\Text\Json\Serialization\JsonSerializer.Read.Node.cs (4)
21/// <exception cref="JsonException"> 43/// <exception cref="JsonException"> 70/// <exception cref="JsonException"> 112/// <exception cref="JsonException">
System\Text\Json\Serialization\JsonSerializer.Read.Span.cs (5)
20/// <exception cref="JsonException"> 47/// <exception cref="JsonException"> 73/// <exception cref="JsonException"> 92/// <exception cref="JsonException"> 114/// <exception cref="JsonException">
System\Text\Json\Serialization\JsonSerializer.Read.Stream.cs (10)
33/// <exception cref="JsonException"> 66/// <exception cref="JsonException"> 101/// <exception cref="JsonException"> 136/// <exception cref="JsonException"> 173/// <exception cref="JsonException"> 203/// <exception cref="JsonException"> 230/// <exception cref="JsonException"> 256/// <exception cref="JsonException"> 285/// <exception cref="JsonException"> 323/// <exception cref="JsonException">
System\Text\Json\Serialization\JsonSerializer.Read.String.cs (10)
28/// <exception cref="JsonException"> 62/// <exception cref="JsonException"> 97/// <exception cref="JsonException"> 135/// <exception cref="JsonException"> 178/// <exception cref="JsonException"> 214/// <exception cref="JsonException"> 248/// <exception cref="JsonException"> 275/// <exception cref="JsonException"> 306/// <exception cref="JsonException"> 351/// <exception cref="JsonException">
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (7)
21/// <exception cref="JsonException"> 75/// <exception cref="JsonException"> 127/// <exception cref="JsonException"> 173/// <exception cref="JsonException"> 223/// <exception cref="JsonException"> 288catch (JsonException) 313catch (JsonException)
System\Text\Json\Serialization\JsonSerializerOptions.cs (3)
291/// By default, it's set to false, and <exception cref="JsonException"/> is thrown if a trailing comma is encountered. 560/// Going past this depth will throw a <exception cref="JsonException"/>. 631/// By default <exception cref="JsonException"/> is thrown if a comment is encountered.
System\Text\Json\Serialization\ReferenceHandler.cs (2)
34/// * A <see cref="JsonException"/> is thrown if a `$ref` metadata property is found within the JSON object. 44/// If the JSON is not well-formed, a <see cref="JsonException"/> is thrown.
System\Text\Json\ThrowHelper.cs (1)
376public static JsonException GetJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte, ReadOnlySpan<byte> bytes)
System\Text\Json\ThrowHelper.Serialization.cs (4)
458JsonException jsonException = new JsonException(null, ex); 463public static void AddJsonExceptionInformation(scoped ref ReadStack state, in Utf8JsonReader reader, JsonException ex) 496JsonException jsonException = new JsonException(null, ex); 501public static void AddJsonExceptionInformation(ref WriteStack state, JsonException ex)
System\Text\Json\Writer\JsonWriterOptions.cs (1)
97/// Reading past this depth will throw a <exception cref="JsonException"/>.
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (4)
19/// <exception cref="JsonException"> 52/// <exception cref="JsonException"> 83/// <exception cref="JsonException"> 119/// <exception cref="JsonException">