You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran in to this by accident. Not entirely sure if it's already fixed \ tracked since there's a few that are pretty similar to this one:
using System.Text.Json;namespaceConsoleApp3{classProgram{staticvoidMain(string[]args){varjson= JsonSerializer.Deserialize<int[]>("{ \"a\": \"b\" }");}}}
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at System.Text.Json.JsonClassInfo.GetProperty(ReadOnlySpan`1 propertyName, ReadStackFrame& frame)
at System.Text.Json.JsonSerializer.HandlePropertyName(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
at System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader)
at System.Text.Json.JsonSerializer.ParseCore(String json, Type returnType, JsonSerializerOptions options)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
The text was updated successfully, but these errors were encountered:
It looks like there's a class of null refs that happen whenever the T we are deserializing to doesn't match the input payload. We should look at the previous fixes for similar cases and make sure we are guarding against the whole set.
Ran in to this by accident. Not entirely sure if it's already fixed \ tracked since there's a few that are pretty similar to this one:
The text was updated successfully, but these errors were encountered: