C
Join ServerC#
help
❔ ✅ JsonSerializer not serializing dictionary
SSinaesthetic12/23/2022
I see this was an issue in .NET 6 and fixed in 7 however, it seems to still not be working in my project. All of my projects are on .NET 7 now, rebuilt, etc., dictionaries are being ignored. When I try the same code in LinqPad, it works fine.
Looking for ideas...
Looking for ideas...
SSinaesthetic12/23/2022
object explorer for System.Text.Json is showing 7.0.1
Pphaseshift12/23/2022
News to me. Sure We have plenty of dicts serialised ok in net5 and 6
SSinaesthetic12/23/2022
It might be specifically
Dictionary<string, object>
SSinaesthetic12/23/2022

SSinaesthetic12/23/2022
SSinaesthetic12/23/2022
Difference is, this issues says it was throwing, but mine is simply being ignored
SSinaesthetic12/23/2022


SSinaesthetic12/23/2022
super weird
SSinaesthetic12/23/2022
OMG i need a vacation... nevermind.... the property not being serialized didn't even have a getter setter, it was declared as a field...
Pphaseshift12/23/2022
Oof
SSinaesthetic12/23/2022
Yeah I miss the days when the IDE used to color fields differently than properties
AAccord12/24/2022
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.