79 references to 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.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)
64throw new JsonException("Expected StartObject or Null"); 73throw new JsonException("Expected PropertyName"); 156throw new JsonException("Expected PropertyName");
Microsoft.CodeAnalysis.LanguageServer.Protocol (16)
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\StringEnumConverter.cs (1)
49throw new JsonException(string.Format(CultureInfo.InvariantCulture, LanguageServerProtocolResources.StringEnumSerializationError, reader.GetString()));
Protocol\Converters\SumConverter.cs (2)
214throw new JsonException(LanguageServerProtocolResources.NoSumTypeMatch); 253throw 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 (1)
45throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ClassifiedTextElement)}");
Protocol\Internal\Converters\ClassifiedTextRunConverter.cs (2)
22throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ClassifiedTextRun)}"); 33throw new JsonException("Expected start object or null tokens");
Protocol\Internal\Converters\ContainerElementConverter.cs (1)
54throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ContainerElement)}");
Protocol\Internal\Converters\ImageElementConverter.cs (2)
45throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ImageElement)}"); 55throw new JsonException("Expected start object or null tokens");
Protocol\Internal\Converters\ImageIdConverter.cs (2)
23throw new JsonException($"Expected {ObjectContentConverter.TypeProperty} property value {nameof(ImageId)}"); 32throw new JsonException("Expected start object or null tokens");
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.");
System.Text.Json (10)
System\Text\Json\ThrowHelper.Serialization.cs (10)
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())); 696throw new JsonException(SR.Format(SR.UnmappedJsonProperty, unmappedPropertyName, type));