© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
10 replies
som45oul

✅ JsonSerializer: Won't deserialize correctly

Hi there. Hoping someone can help me spot the source of my problem with my simple WinForms app here.

Basically, I can serialize an object correctly, but when I try to deserialize it, the "sub objects" don't populate correctly. No errors are thrown.

The object itself is a Dictionary<string, Dictionary<string, ScreenSettings>>

Where the following class is in the same form:

public class ScreenSettings
{
public string Name;
public bool Hide;
}

During debug, I can see that the JSON is correctly created with Serialize, however when I Deserialize, the "ScreenSettings" are not populated.

What am I doing wrong here?

Grateful in advance for the kind help.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ How to deserialize correctly
C#CC# / help
4y ago
JsonSerializer.Deserialize will not translate number to string
C#CC# / help
3y ago
❔ Why does the JsonSerializer.Deserialize return a nullable object
C#CC# / help
3y ago