1 type derived from JsonException
System.Text.Json (1)
System\Text\Json\Reader\JsonReaderException.cs (1)
10internal sealed class JsonReaderException : JsonException
227 instantiations of JsonException
aspire (11)
Configuration\AspireConfigFile.cs (1)
146throw new JsonException(
Configuration\FlexibleBooleanConverter.cs (2)
24_ => throw new JsonException($"Unexpected token parsing boolean. Token: {reader.TokenType}") 35throw new JsonException($"Invalid boolean value: '{value}'. Expected 'true' or 'false'.");
Configuration\FlexibleBooleanDictionaryConverter.cs (6)
25throw new JsonException($"Expected StartObject, got {reader.TokenType}"); 39throw new JsonException($"Expected PropertyName, got {reader.TokenType}"); 42var key = reader.GetString() ?? throw new JsonException("Property name cannot be null"); 51_ => throw new JsonException($"Cannot convert {reader.TokenType} to boolean for key '{key}'") 57throw new JsonException("Unexpected end of JSON"); 84throw new JsonException($"Cannot convert string '{value}' to boolean for key '{key}'. Expected 'true' or 'false'.");
Scaffolding\ScaffoldingService.cs (1)
301?? throw new JsonException("The root package.json is not a JSON object.");
Utils\EnvironmentChecker\EnvironmentCheckResult.cs (1)
145_ => throw new JsonException($"Unknown status value: {value}")
Aspire.Cli.Tests (2)
Commands\ExtensionInternalCommandTests.cs (2)
89throw new JsonException($"Failed to deserialize JSON: {allOutput}", ex); 166throw new JsonException($"Failed to deserialize JSON: {allOutput}", ex);
Aspire.Dashboard (7)
Model\GenAI\GenAIMessageParsingHelper.cs (6)
36throw new JsonException("Expected a JSON array."); 91throw new JsonException("Expected start of chat message object."); 107throw new JsonException("Expected property name."); 117throw new JsonException("Unexpected end of JSON while reading role value."); 128throw new JsonException("Unexpected end of JSON while reading property value."); 133throw new JsonException("Unexpected end of JSON while skipping property value.");
Model\GenAI\GenAIMessages.cs (1)
216throw new JsonException("Missing 'type' property.");
Aspire.Dashboard.Tests (1)
Model\GenAIItemPartViewModelTests.cs (1)
177Error = new JsonException("Test deserialization error"),
Aspire.Hosting (15)
Dcp\JsonPatch.cs (13)
37throw new JsonException("A JSON Patch operation must contain string 'op' and 'path' properties."); 140throw new JsonException($"JSON Pointer path '{path}' must be empty or start with '/'."); 165throw new JsonException($"JSON Pointer segment '{segment}' ends with an incomplete escape."); 172_ => throw new JsonException($"JSON Pointer segment '{segment}' contains an invalid escape."), 183throw new JsonException($"JSON Patch operation '{operation}' is not supported."); 188throw new JsonException($"JSON Patch operation '{operation}' requires a 'value' property."); 212throw new JsonException("A JSON Patch path can only traverse objects and arrays."); 220var parent = current ?? throw new JsonException("A JSON Patch path cannot traverse a null value."); 229?? throw new JsonException($"JSON Patch path segment '{segment}' refers to a null value."), 230_ => throw new JsonException($"JSON Patch path segment '{segment}' does not exist."), 247throw new JsonException($"JSON Patch remove path refers to missing property '{propertyName}'."); 253throw new JsonException($"JSON Patch replace path refers to missing property '{propertyName}'."); 293throw new JsonException($"JSON Patch array index '{indexText}' is invalid for an array with {count} elements.");
Dcp\Model\KubernetesMicroTimeJsonConverter.cs (2)
24throw new JsonException($"Expected a string token for Kubernetes MicroTime but found {reader.TokenType}."); 30throw new JsonException("Expected a non-empty Kubernetes MicroTime value.");
Aspire.Hosting.Browsers (5)
BrowserLogsCdpProtocol.cs (5)
829_ => throw new JsonException($"Unsupported JSON token '{reader.TokenType}' for tracked browser protocol value.") 868throw new JsonException($"Unsupported tracked browser protocol value type '{value.GetType()}'."); 909throw new JsonException("Tracked browser protocol object value was malformed."); 913?? throw new JsonException("Tracked browser protocol object property name was null."); 917throw new JsonException("Tracked browser protocol object value ended unexpectedly.");
Aspire.Hosting.Browsers.Tests (5)
src\Aspire.Hosting.Browsers\BrowserLogsCdpProtocol.cs (5)
829_ => throw new JsonException($"Unsupported JSON token '{reader.TokenType}' for tracked browser protocol value.") 868throw new JsonException($"Unsupported tracked browser protocol value type '{value.GetType()}'."); 909throw new JsonException("Tracked browser protocol object value was malformed."); 913?? throw new JsonException("Tracked browser protocol object property name was null."); 917throw new JsonException("Tracked browser protocol object value ended unexpectedly.");
Aspire.Hosting.RemoteHost (3)
Ats\AtsMarshaller.cs (3)
247throw new JsonException("TimeSpan milliseconds must be a finite number."); 256throw new JsonException("TimeSpan milliseconds are outside the supported range.", ex); 266throw new JsonException("TimeSpan values must be milliseconds or a standard TimeSpan string.");
cdac-build-tool (4)
JsonConverter\FieldModelJsonConverter.cs (1)
18throw new JsonException();
JsonConverter\GlobalModelJsonConverter.cs (1)
13throw new JsonException();
JsonConverter\GlobalValueJsonConverter.cs (1)
13throw new JsonException();
JsonConverter\TypeModelJsonConverter.cs (1)
15throw new JsonException();
Microsoft.AspNetCore.Components.Server (3)
src\aspnetcore\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\aspnetcore\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\aspnetcore\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.Identity (2)
Passkeys\BufferSourceJsonConverter.cs (2)
24throw new JsonException("Unexpected escaped value in base64url string."); 30throw new JsonException("Expected a valid base64url string.");
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.OpenApi (6)
Schemas\OpenApiJsonSchema.cs (3)
23throw new JsonException("Expected StartObject token to represent beginning of schema."); 33var propertyName = reader.GetString() ?? throw new JsonException("Encountered unexpected missing property name."); 44throw new JsonException("Encountered unexpected EOF token without producing a schema.");
Schemas\OpenApiJsonSchema.Helpers.cs (3)
69throw new JsonException("Expected StartObject or Null"); 78throw new JsonException("Expected PropertyName"); 163throw new JsonException("Expected PropertyName");
Microsoft.Diagnostics.DataContractReader (38)
ContractDescriptorParser.cs (38)
38throw new JsonException(); 42throw new JsonException(); 46throw new JsonException(); 54throw new JsonException(); 58throw new JsonException(); 60string propertyName = reader.GetString() ?? throw new JsonException(); 88throw new JsonException(); 136return reader.GetString() ?? throw new JsonException(); 137throw new JsonException(); 146throw new JsonException(); 155throw new JsonException(); 157string fieldName = reader.GetString() ?? throw new JsonException(); 163throw new JsonException($"Size specified multiple times: {size} and {newSize}"); 168throw new JsonException($"Duplicate field name: {fieldName}"); 172throw new JsonException(); 183throw new JsonException(); 189throw new JsonException(); 194throw new JsonException(); 195string type = reader.GetString() ?? throw new JsonException(); 198throw new JsonException(); 209throw new JsonException(); 217throw new JsonException(); 219string name = reader.GetString() ?? throw new JsonException(); 224throw new JsonException(); 238throw new JsonException(); 255throw new JsonException(); 257string type = reader.GetString() ?? throw new JsonException(); 260throw new JsonException(); 265throw new JsonException(); 270throw new JsonException(); 275throw new JsonException(); 280throw new JsonException(); 281string indirectType = reader.GetString() ?? throw new JsonException(); 284throw new JsonException(); 291throw new JsonException("Indirect global value could not be converted to a number."); 308throw new JsonException(); 317throw new JsonException(); 323throw new JsonException();
Microsoft.DotNet.HotReload.Utils.Generator.Data (2)
Script\Json\ScriptCapabilitiesConverter.cs (2)
22_ => throw new JsonException(), 28throw 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)
39throw new JsonException( 56throw new JsonException(
Storage\DiskBasedResultStore.cs (1)
78? throw new JsonException(
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (8)
parent\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)
44?? throw new JsonException( 62?? throw new JsonException(
Storage\AzureStorageResultStore.cs (1)
119?? throw new JsonException(
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIResponseClientTests.cs (1)
6947throw new JsonException($"Unrecognized property '{propertyName}'.");
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.");
Microsoft.TemplateEngine.Edge (1)
BuiltInManagedProvider\GlobalSettings.cs (1)
99var wrappedEx = new JsonException(string.Format(LocalizableStrings.GlobalSettings_Error_CorruptedSettings, _globalSettingsFile, ex.Message), ex.Path, ex.LineNumber, ex.BytePositionInLine, ex);
NuGet.ProjectModel (12)
LockFile\Utf8JsonStreamIAssetsLogMessageConverter.cs (1)
53throw new JsonException("Expected StartObject, found " + reader.TokenType);
LockFile\Utf8JsonStreamLockFileConverter.cs (1)
51throw new JsonException("Expected StartObject, found " + reader.TokenType);
LockFile\Utf8JsonStreamLockFileItemConverter.cs (1)
38throw new JsonException("Expected PropertyName, found " + reader.TokenType);
LockFile\Utf8JsonStreamLockFileLibraryConverter.cs (2)
45throw new JsonException("Expected PropertyName, found " + reader.TokenType); 57throw new JsonException("Expected StartObject, found " + reader.TokenType);
LockFile\Utf8JsonStreamLockFileTargetConverter.cs (1)
24throw new JsonException("Expected PropertyName, found " + reader.TokenType);
LockFile\Utf8JsonStreamLockFileTargetConverterV4.cs (1)
23throw new JsonException("Expected PropertyName, found " + reader.TokenType);
LockFile\Utf8JsonStreamLockFileTargetLibraryConverter.cs (2)
80throw new JsonException("Expected PropertyName, found " + reader.TokenType); 94throw new JsonException("Expected StartObject, found " + reader.TokenType);
src\nuget-client\build\Shared\Utf8JsonStreamReader.cs (2)
133throw new JsonException($"Expected start object token but instead found '{TokenType}'"); 158throw new JsonException($"Expected start array token but instead found '{TokenType}'");
Utf8JsonStreamProjectFileDependencyGroupConverter.cs (1)
24throw new JsonException("Expected PropertyName, found " + reader.TokenType);
NuGet.Protocol (24)
Converters\FingerprintsStjConverter.cs (1)
18throw new JsonException();
Converters\MetadataStringOrArrayStjConverter.cs (2)
28throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_UnexpectedJsonToken, reader.TokenType)); 39throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_UnexpectedJsonToken, reader.TokenType));
Converters\NuGetFrameworkStjConverter.cs (1)
28_ => throw new JsonException(string.Format(System.Globalization.CultureInfo.CurrentCulture, Strings.Error_UnexpectedJsonToken, reader.TokenType))
Converters\NuGetVersionStjConverter.cs (1)
24_ => throw new JsonException(string.Format(System.Globalization.CultureInfo.CurrentCulture, Strings.Error_UnexpectedJsonToken, reader.TokenType))
Converters\PackageDependencyGroupStjConverter.cs (4)
26throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_UnexpectedJsonToken, reader.TokenType)); 36throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_UnexpectedJsonToken, reader.TokenType)); 65throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_UnexpectedJsonToken, reader.TokenType)); 72throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_UnexpectedJsonToken, reader.TokenType));
Converters\Utf8JsonReaderExtensions.cs (1)
28_ => throw new JsonException(string.Format(System.Globalization.CultureInfo.CurrentCulture, Strings.Error_UnexpectedJsonToken, reader.TokenType))
Model\RepositoryCertificateInfo.cs (4)
51Fingerprints = fingerprints ?? throw new System.Text.Json.JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_RequiredJsonPropertyMissing, JsonProperties.Fingerprints)); 52Subject = subject ?? throw new System.Text.Json.JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_RequiredJsonPropertyMissing, JsonProperties.Subject)); 53Issuer = issuer ?? throw new System.Text.Json.JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_RequiredJsonPropertyMissing, JsonProperties.Issuer)); 56ContentUrl = contentUrl ?? throw new System.Text.Json.JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_RequiredJsonPropertyMissing, JsonProperties.ContentUrl));
Plugins\MessageConverter.cs (8)
110throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_RequiredJsonPropertyMissing, nameof(Message.RequestId))); 116throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.ArgumentCannotBeNullOrEmpty, nameof(Message.RequestId))); 121throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_RequiredJsonPropertyMissing, nameof(Message.Type))); 127throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Plugin_UnrecognizedEnumValue, typeStr)); 132throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_RequiredJsonPropertyMissing, nameof(Message.Method))); 138throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Plugin_UnrecognizedEnumValue, methodStr)); 146throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_UnexpectedPayloadTokenType, payloadProp.ValueKind)); 163throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Plugin_UnrecognizedEnumValue, $"{messageMethod}/{messageType}"));
Plugins\RawJsonStringConverter.cs (1)
22throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_UnexpectedPayloadTokenType, reader.TokenType));
Plugins\StjSemanticVersionConverter.cs (1)
23throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_UnexpectedJsonToken, reader.TokenType));
System.Text.Json (21)
System\Text\Json\Serialization\Converters\FSharp\FSharpUnionConverter.cs (1)
283throw new JsonException(SR.Format(SR.FSharpUnionMissingDiscriminatorProperty, _typeDiscriminatorPropertyName, typeof(T)));
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (2)
54throw new JsonException(); 75throw new JsonException();
System\Text\Json\ThrowHelper.Serialization.cs (18)
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 }; 318throw new JsonException(SR.Format(SR.JsonRequiredPropertiesMissing, parent.Type, builder.ToString())); 324throw new JsonException(SR.Format(SR.JsonRequiredPropertiesMissing, type, propertyList)); 351throw new JsonException(SR.Format(SR.DuplicatePropertiesNotAllowed_JsonPropertyInfo, property.Name, property.DeclaringType)); 357throw new JsonException(SR.DuplicatePropertiesNotAllowed); 363throw new JsonException(SR.Format(SR.DuplicatePropertiesNotAllowed_NameSpan, Truncate(name))); 370throw new JsonException(SR.Format(SR.DuplicatePropertiesNotAllowed_NameSpan, Truncate(name))); 514throw new JsonException(message, path, ex.LineNumber, ex.BytePositionInLine, ex); 520JsonException jsonException = new JsonException(null, ex); 560JsonException jsonException = new JsonException(null, ex); 760throw new JsonException(SR.Format(SR.UnmappedJsonProperty, unmappedPropertyName, type));
305 references to JsonException
aspire (52)
Acquisition\InstallSidecarReader.cs (2)
66if (error is JsonException) 200=> ex is JsonException
Acquisition\PeerInstallProbe.cs (1)
185catch (JsonException ex)
Agents\AspireSkills\AspireSkillsBundleProvider.cs (1)
134catch (JsonException ex)
Agents\AspireSkills\AspireSkillsInstaller.cs (1)
278catch (Exception ex) when (ex is HttpRequestException or HttpIOException or JsonException)
Agents\AspireSkills\EmbeddedAspireSkillsBundleProvider.cs (1)
127catch (JsonException ex)
Agents\AspireSkills\GitHubArtifactAttestationVerifier.cs (1)
156catch (JsonException)
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (1)
179catch (JsonException)
Agents\CopilotCli\CopilotCliAgentEnvironmentScanner.cs (1)
166catch (JsonException)
Agents\DeprecatedMcpCommandScanner.cs (1)
86catch (JsonException ex)
Agents\Hooks\TelemetryHookConfigurator.cs (1)
177catch (JsonException ex)
Agents\McpConfigFileHelper.cs (3)
54catch (JsonException) 67/// <exception cref="InvalidOperationException">Thrown when the file exists but contains malformed JSON, wrapping the underlying <see cref="JsonException"/>.</exception> 86catch (JsonException ex)
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (1)
128catch (JsonException)
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (1)
218catch (JsonException)
Commands\AgentInitCommand.cs (1)
452if (ex.InnerException is JsonException)
Commands\InitCommand.cs (1)
545catch (JsonException ex)
Commands\IntegrationPackageSearchService.cs (1)
164catch (JsonException ex)
Commands\McpCallCommand.cs (1)
91catch (JsonException ex)
Commands\RestoreCommand.cs (1)
203catch (JsonException ex)
Configuration\AspireConfigFile.cs (1)
144catch (JsonException ex)
Configuration\ConfigurationService.cs (1)
476catch (JsonException ex)
DotNet\DotNetCliRunner.cs (2)
1480catch (JsonException ex) 1616catch (JsonException ex)
Migrations\TypeScriptAppHostMigration.cs (3)
223catch (JsonException ex) 271catch (JsonException ex) 314catch (JsonException ex)
Npm\SigstoreNpmProvenanceChecker.cs (1)
191catch (JsonException)
NuGet\BundleNuGetPackageCache.cs (1)
264catch (JsonException ex)
NuGet\BundleNuGetService.cs (1)
272catch (Exception ex) when (ex is InvalidOperationException or JsonException or IOException or UnauthorizedAccessException)
Projects\AppHostRpcClient.cs (1)
167catch (JsonException)
Projects\DotNetAppHostProject.cs (2)
2033catch (JsonException ex) 2266catch (JsonException)
Projects\GuestAppHostProject.cs (2)
240catch (JsonException ex) 918catch (JsonException ex)
Projects\ProjectLocator.cs (3)
699catch (JsonException ex) 801catch (JsonException ex) 846private void ReportInvalidConfigurationFile(JsonException ex, string message, bool silent)
Projects\TypeScriptAppHostToolchainResolver.cs (1)
332catch (Exception ex) when (ex is JsonException or IOException
Scaffolding\ScaffoldingService.cs (2)
303catch (JsonException ex) 692catch (JsonException)
src\Shared\ContainerRuntimeDetector.cs (1)
404catch (JsonException)
src\Shared\PackageUpdateHelpers.cs (1)
215catch (JsonException)
Telemetry\InternalMicrosoftDetector.cs (5)
320catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or JsonException) 663catch (Exception ex) when (ex is HttpRequestException or JsonException or InvalidOperationException or TaskCanceledException) 685catch (Exception ex) when (ex is OperationCanceledException or TimeoutException or HttpRequestException or JsonException or InvalidOperationException or TaskCanceledException) 898catch (JsonException) 1193catch (JsonException)
Utils\ConfigurationHelper.cs (2)
204catch (JsonException) 275catch (JsonException ex)
Utils\EnvironmentChecker\DeprecatedAgentConfigCheck.cs (1)
75catch (JsonException)
Aspire.Acquisition.Tests (2)
Scripts\Common\RealGitHubPRFixture.cs (2)
102catch (Exception ex) when (ex is ToolCommandException or JsonException or InvalidOperationException) 139catch (Exception ex) when (ex is ToolCommandException or JsonException or InvalidOperationException)
Aspire.Cli.Tests (11)
Acquisition\InstallSidecarWriterTests.cs (1)
67Assert.ThrowsAny<JsonException>(() => InstallSidecarWriter.PrepareForSelfUpdate(workspace.Path, "staging"));
Agents\AspireSkillsBundleTests.cs (1)
238Assert.IsType<JsonException>(exception.InnerException);
Commands\ExtensionInternalCommandTests.cs (2)
86catch (JsonException ex) 163catch (JsonException ex)
Configuration\AspireConfigFileTests.cs (4)
139var ex = Assert.Throws<JsonException>(() => AspireConfigFile.Load(workspace.WorkspaceRoot.FullName)); 153var ex = Assert.Throws<JsonException>(() => AspireConfigFile.Load(workspace.WorkspaceRoot.FullName));
ProfileCaptureServiceTests.cs (1)
440await Assert.ThrowsAsync<JsonException>(() => session.ExportAsync(CancellationToken.None));
Projects\ProjectLocatorTests.cs (2)
3928Assert.IsAssignableFrom<JsonException>(warning.Exception); 3958Assert.IsAssignableFrom<JsonException>(warning.Exception);
Aspire.Dashboard (9)
Model\GenAI\GenAIMessageParsingHelper.cs (3)
46catch (JsonException) 69catch (JsonException) 157catch (JsonException)
Model\GenAI\GenAIMessages.cs (1)
235catch (JsonException ex)
Model\TelemetryImportService.cs (1)
131catch (JsonException ex)
Model\TextVisualizerViewModel.cs (1)
125catch (JsonException)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (1)
168catch (JsonException ex)
ServiceClient\DashboardRunStore.cs (2)
365catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or JsonException) 475catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or JsonException)
Aspire.Dashboard.Tests (1)
Model\GenAIMessageParsingHelperTests.cs (1)
34Assert.Throws<JsonException>(() =>
Aspire.Hosting (21)
ApplicationModel\DebugSupportExtensions.cs (1)
200catch (JsonException)
Dashboard\DashboardEventHandlers.cs (1)
959catch (JsonException)
Dashboard\InteractionFileUploadStore.cs (1)
293catch (JsonException ex)
DistributedApplicationBuilder.cs (1)
1056catch (Exception ex) when (ex is ArgumentException or IOException or UnauthorizedAccessException or JsonException or InvalidDataException or FormatException or TimeoutException)
Lifecycle\TerminalHostOrphanCleanupService.cs (1)
270catch (JsonException ex)
Pipelines\Internal\FileDeploymentStateManager.cs (4)
104catch (Exception ex) when (ex is JsonException or InvalidOperationException or InvalidDataException) 157catch (Exception ex) when (ex is JsonException or InvalidOperationException or InvalidDataException) 618exception is JsonException or InvalidOperationException or InvalidDataException or IOException or UnauthorizedAccessException; 714catch (Exception ex) when (ex is JsonException or InvalidOperationException or InvalidDataException)
Pipelines\Internal\UserSecretsDeploymentStateManager.cs (1)
47catch (JsonException ex)
Publishing\ContainerRuntimeBase.cs (5)
200catch (JsonException) 236catch (JsonException) 285catch (JsonException) 839catch (JsonException) 857catch (JsonException)
Publishing\PodmanContainerRuntime.cs (3)
99catch (JsonException) 399catch (JsonException ex) 458catch (JsonException)
src\Shared\ContainerRuntimeDetector.cs (1)
404catch (JsonException)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
69catch (JsonException ex)
src\Shared\PackageUpdateHelpers.cs (1)
215catch (JsonException)
Aspire.Hosting.Azure (2)
AzureProvisioningController.cs (1)
2642catch (JsonException ex)
AzureProvisioningFailureDetails.cs (1)
576catch (JsonException)
Aspire.Hosting.Azure.Functions (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
69catch (JsonException ex)
Aspire.Hosting.Azure.Sandboxes (1)
Internal\Adc\AzureDevComputeClient.cs (1)
283catch (Exception ex) when (ex is JsonException or InvalidOperationException or HttpRequestException or IOException or NotSupportedException)
Aspire.Hosting.Azure.Tests (1)
AzureSandboxesTests.cs (1)
1399Assert.IsType<JsonException>(exception.OriginalException);
Aspire.Hosting.Blazor (2)
BlazorHostedExtensions.cs (1)
270catch (JsonException ex)
BlazorWasmAppBuilder.cs (1)
88catch (JsonException ex)
Aspire.Hosting.Browsers (5)
BrowserEndpointDiscovery.cs (2)
80catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or JsonException) 122catch (Exception ex) when (!cancellationToken.IsCancellationRequested && ex is HttpRequestException or IOException or JsonException or OperationCanceledException)
BrowserLogsConfigurationManager.cs (1)
237catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or System.Text.Json.JsonException)
ChromiumBrowserResolver.cs (2)
104catch (JsonException ex) 185catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or JsonException)
Aspire.Hosting.Browsers.Tests (5)
src\Aspire.Hosting.Browsers\BrowserEndpointDiscovery.cs (2)
80catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or JsonException) 122catch (Exception ex) when (!cancellationToken.IsCancellationRequested && ex is HttpRequestException or IOException or JsonException or OperationCanceledException)
src\Aspire.Hosting.Browsers\BrowserLogsConfigurationManager.cs (1)
237catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or System.Text.Json.JsonException)
src\Aspire.Hosting.Browsers\ChromiumBrowserResolver.cs (2)
104catch (JsonException ex) 185catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or JsonException)
Aspire.Hosting.DevTunnels (1)
DevTunnelCliClient.cs (1)
336catch (JsonException ex)
Aspire.Hosting.Dotnet (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
69catch (JsonException ex)
Aspire.Hosting.JavaScript (2)
JavaScriptHostingExtensions.cs (2)
2099catch (JsonException) 2317catch (JsonException)
Aspire.Hosting.Kubernetes (5)
Deployment\HelmDeploymentEngine.cs (1)
753catch (JsonException ex)
KubernetesEnvironmentResource.cs (4)
1727catch (System.Text.Json.JsonException) 1785catch (System.Text.Json.JsonException) 1871catch (System.Text.Json.JsonException ex) 2112catch (System.Text.Json.JsonException ex)
Aspire.Hosting.OpenAI (1)
OpenAIHealthCheck.cs (1)
128catch (JsonException jex)
Aspire.Hosting.Radius (1)
Secrets\SealedSecretManifest.cs (1)
438catch (JsonException)
Aspire.Hosting.Radius.Tests (1)
Secrets\SealedSecretApplyStepTests.cs (1)
663Assert.ThrowsAny<JsonException>(() => SealedSecretApplyStep.ParseSealedSecretStatus("{"));
Aspire.Hosting.RemoteHost (3)
Ats\AtsMarshaller.cs (3)
281catch (Exception ex) when (ex is JsonException or NotSupportedException) 713catch (JsonException ex) 1059catch (JsonException)
Aspire.Hosting.Testing (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
69catch (JsonException ex)
Aspire.Hosting.Tests (1)
VersionChecking\PackageUpdateHelpersTests.cs (1)
303Assert.ThrowsAny<JsonException>(() => PackageUpdateHelpers.ParsePackageSearchResults(pollutedStdout));
dotnet (3)
src\sdk\src\Common\WorkloadFileBasedInstall.cs (1)
67catch (JsonException)
ToolManifest\ToolManifestEditor.cs (1)
216e is JsonException || e is FormatException)
ToolPackage\LocalToolsResolverCache.cs (1)
100catch (JsonException)
dotnet-aot (3)
src\sdk\src\Cli\dotnet\NugetSearch\NugetToolSearchApiRequest.cs (1)
139catch (JsonException e)
src\sdk\src\Cli\dotnet\ToolManifest\ToolManifestEditor.cs (1)
216e is JsonException || e is FormatException)
src\sdk\src\Cli\dotnet\ToolPackage\LocalToolsResolverCache.cs (1)
100catch (JsonException)
dotnet-sourcelink (1)
ILCompiler.Compiler (1)
src\runtime\src\coreclr\tools\Common\Microsoft\SourceLink\Tools\SourceLinkMap.cs (1)
57/// <exception cref="JsonException"><paramref name="json"/> is not valid JSON string.</exception>
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonRequestHelpers.cs (1)
306catch (JsonException ex)
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
1421catch (JsonException ex)
Microsoft.AspNetCore.Identity (12)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (1)
1521catch (System.Text.Json.JsonException jsonException)
PasskeyExceptionExtensions.cs (5)
108public static PasskeyException InvalidAttestationCredentialJsonFormat(JsonException ex) 114public static PasskeyException InvalidAssertionCredentialJsonFormat(JsonException ex) 120public static PasskeyException InvalidClientDataJsonFormat(JsonException ex) 132public static PasskeyException InvalidAttestationStateJsonFormat(JsonException ex) 135public static PasskeyException InvalidAssertionStateJsonFormat(JsonException ex)
PasskeyHandler.cs (6)
231catch (JsonException) 328catch (JsonException ex) 343catch (JsonException ex) 486catch (JsonException ex) 501catch (JsonException ex) 682catch (JsonException ex)
Microsoft.AspNetCore.Mvc.Core (2)
Formatters\SystemTextJsonInputFormatter.cs (2)
88catch (JsonException jsonException) 133private Exception WrapExceptionForModelState(JsonException jsonException)
Microsoft.AspNetCore.OpenApi (1)
Schemas\OpenApiJsonSchema.Helpers.cs (1)
59/// <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.Build (2)
Construction\Solution\SolutionFile.cs (2)
653catch (Exception e) when (e is JsonException || e is KeyNotFoundException || e is InvalidOperationException) 676catch (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.Workspaces.MSBuild (1)
Rpc\RpcClient.cs (1)
65catch (JsonException ex)
Microsoft.Diagnostics.DataContractReader (1)
ContractDescriptorTarget.cs (1)
415catch (JsonException ex)
Microsoft.DotNet.Cli.Definitions (1)
Commands\Test\TestCommandDefinition.cs (1)
96catch (Exception ex) when (ex is JsonException or IOException or UnauthorizedAccessException)
Microsoft.DotNet.Cli.Telemetry (1)
Implementation\BreezePartialContent.cs (1)
32catch (JsonException)
Microsoft.DotNet.HotReload.Utils.Generator (1)
Script\Json\Parsing.cs (1)
33} catch (JsonException exn) {
Microsoft.DotNet.HotReload.Utils.Generator.Tasks (1)
HotReloadDeltaGeneratorComputeScriptOutputs.cs (1)
71catch (JsonException exn)
Microsoft.DotNet.HotReload.Watch (2)
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\StaticWebAssetsManifest.cs (2)
136/// <exception cref="JsonException">The format is invalid.</exception> 145catch (JsonException e)
Microsoft.DotNet.ProjectTools (1)
LaunchSettings\LaunchSettings.cs (1)
166catch (Exception ex) when (ex is JsonException or IOException)
Microsoft.Extensions.AI.Abstractions (6)
Functions\AIFunctionFactory.cs (6)
126/// <exception cref="JsonException">A parameter to <paramref name="method"/> is not serializable.</exception> 201/// <exception cref="JsonException">A parameter to <paramref name="method"/> is not serializable.</exception> 298/// <exception cref="JsonException">A parameter to <paramref name="method"/> or its return type is not serializable.</exception> 383/// <exception cref="JsonException">A parameter to <paramref name="method"/> or its return type is not serializable.</exception> 491/// <exception cref="JsonException">A parameter to <paramref name="method"/> or its return type is not serializable.</exception> 994catch (JsonException)
Microsoft.Extensions.AI.Abstractions.Tests (2)
Contents\FunctionCallContentTests.cs (1)
383[InlineData(typeof(JsonException))]
Embeddings\BinaryEmbeddingTests.cs (1)
94Assert.Throws<JsonException>(() => JsonSerializer.Deserialize(json, TestJsonSerializerContext.Default.Embedding));
Microsoft.Extensions.AI.Evaluation.Quality (4)
IntentResolutionEvaluator.cs (2)
343catch (JsonException) 368catch (JsonException ex)
RelevanceTruthAndCompletenessEvaluator.cs (2)
291catch (JsonException) 316catch (JsonException ex)
Microsoft.Extensions.AI.Evaluation.Tests (6)
IntentResolutionRatingTests.cs (3)
286Assert.Throws<JsonException>(() => IntentResolutionRating.FromJson(json)); 302Assert.Throws<JsonException>(() => IntentResolutionRating.FromJson(json)); 322Assert.Throws<JsonException>(() => IntentResolutionRating.FromJson(json));
RelevanceTruthAndCompletenessRatingTests.cs (3)
342Assert.Throws<JsonException>(() => RelevanceTruthAndCompletenessRating.FromJson(json)); 358Assert.Throws<JsonException>(() => RelevanceTruthAndCompletenessRating.FromJson(json)); 380Assert.Throws<JsonException>(() => RelevanceTruthAndCompletenessRating.FromJson(json));
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
126catch (JsonException)
Microsoft.Extensions.AI.OpenAI (1)
OpenAIResponsesChatClient.cs (1)
1929catch (JsonException)
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (2)
248var ex = Assert.Throws<JsonException>(() => response.Result);
Microsoft.Extensions.Configuration.Json (1)
JsonConfigurationProvider.cs (1)
32catch (JsonException e)
Microsoft.SourceLink.Tools.Package (1)
SourceLinkMap.cs (1)
82/// <exception cref="JsonException"><paramref name="json"/> is not valid JSON string.</exception>
Microsoft.TemplateEngine.Cli (1)
PostActionProcessors\AddJsonPropertyPostActionProcessor.cs (1)
202catch (JsonException)
Microsoft.TemplateEngine.Edge (2)
BuiltInManagedProvider\GlobalSettings.cs (2)
97catch (JsonException ex) 99var wrappedEx = new JsonException(string.Format(LocalizableStrings.GlobalSettings_Error_CorruptedSettings, _globalSettingsFile, ex.Message), ex.Path, ex.LineNumber, ex.BytePositionInLine, ex);
NuGet.Packaging (1)
NupkgMetadata\NupkgMetadataFileFormat.cs (1)
54catch (JsonException ex)
NuGet.ProjectModel (2)
CacheFileFormat.cs (1)
64catch (Exception ex) when (ex is ArgumentNullException || ex is JsonException || ex is NotSupportedException)
DependencyGraphSpec.cs (1)
290catch (System.Text.Json.JsonException ex)
NuGet.Protocol (2)
Converters\Utf8JsonReaderExtensions.cs (1)
16/// Throws <see cref="JsonException"/> for non-scalar tokens (including Null — handle that in the caller).
Providers\ServiceIndexResourceV3Provider.cs (1)
218catch (JsonException ex)
System.Text.Json (104)
src\runtime\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"> 116/// <exception cref="JsonException"> 202/// <exception cref="JsonException"> 276/// <exception cref="JsonException"> 343/// <exception cref="JsonException"> 391/// <exception cref="JsonException"> 431/// <exception cref="JsonException">
System\Text\Json\Document\JsonDocumentOptions.cs (4)
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. 77/// By default, it's set to true. If set to false, <see cref="JsonException"/> is thrown
System\Text\Json\Document\JsonElement.Parse.cs (5)
44/// <exception cref="JsonException"> 82/// <exception cref="JsonException"><paramref name="utf8Json"/> does not represent a valid single JSON value.</exception> 96/// <exception cref="JsonException"><paramref name="json"/> does not represent a valid single JSON value.</exception> 111/// <exception cref="JsonException"><paramref name="json"/> does not represent a valid single JSON value.</exception> 156/// <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)
657private JsonException GetInvalidLiteralMultiSegment(ReadOnlySpan<byte> span)
System\Text\Json\Serialization\Attributes\JsonUnionAttribute.cs (1)
54/// and otherwise throws a <see cref="JsonException"/>. See
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.Pipe.cs (5)
32/// <exception cref="JsonException"> 68/// <exception cref="JsonException"> 98/// <exception cref="JsonException"> 128/// <exception cref="JsonException"> 169/// <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)
32/// <exception cref="JsonException"> 65/// <exception cref="JsonException"> 100/// <exception cref="JsonException"> 135/// <exception cref="JsonException"> 172/// <exception cref="JsonException"> 202/// <exception cref="JsonException"> 229/// <exception cref="JsonException"> 255/// <exception cref="JsonException"> 284/// <exception cref="JsonException"> 322/// <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 (4)
309/// By default, it's set to false, and <exception cref="JsonException"/> is thrown if a trailing comma is encountered. 578/// Going past this depth will throw a <exception cref="JsonException"/>. 649/// By default <exception cref="JsonException"/> is thrown if a comment is encountered. 862/// By default, it's set to true. If set to false, <see cref="JsonException"/> is thrown
System\Text\Json\Serialization\JsonTypeClassifier.cs (2)
14/// failure and causes a <see cref="System.Text.Json.JsonException"/> to be thrown. 23/// is nullable, and otherwise throws a <see cref="System.Text.Json.JsonException"/>.
System\Text\Json\Serialization\JsonTypeClassifierFactory.cs (1)
39/// one case is nullable, and otherwise throws a <see cref="JsonException"/>. See
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (2)
514/// throw a <see cref="JsonException"/>. On the null path the <c>caseType</c> argument 1148/// surfaced as a <see cref="JsonException"/> only at deserialization time when a token
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)
520JsonException jsonException = new JsonException(null, ex); 525public static void AddJsonExceptionInformation(scoped ref ReadStack state, in Utf8JsonReader reader, JsonException ex) 560JsonException jsonException = new JsonException(null, ex); 565public 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">