Skip to content

Commit 03fd5f6

Browse files
Update src/ModelContextProtocol.Core/Protocol/JsonRpcMessage.cs
1 parent 310a8e0 commit 03fd5f6

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/ModelContextProtocol.Core/Protocol/JsonRpcMessage.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,7 @@ private static Union ParseUnion(ref Utf8JsonReader reader, JsonSerializerOptions
203203

204204
Debug.Assert(reader.TokenType is JsonTokenType.PropertyName);
205205

206-
string? propertyName = reader.GetString();
207-
if (propertyName is null)
208-
{
209-
throw new JsonException("Property name cannot be null");
210-
}
206+
string propertyName = reader.GetString()!;
211207

212208
success = reader.Read();
213209
Debug.Assert(success, "custom converters are guaranteed to be passed fully buffered objects");

0 commit comments

Comments
 (0)