✅ JsonSerializer - properties have null values
Hello,
For some reason the deserialization assigns
null
to every property, but the file is read, because there are exactly 3 entries in the list.
No exception is thrown.
2 Replies
I mean it's just because the names don't match right
You need to either set the naming policy (
camelCase
) for the deserialization in the JsonSerializerOptions
or use JsonPropertyName
on the propertiesWow, I have completely missed that.
I thought it uses
camelCase
by default...
Thank you