© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
❔ Populating existing instances - C#
C
C#
•
4y ago
•
2 replies
TheBoxyBear
❔ Populating existing instances
I
'm migrating from Newtonsoft to System
.Text
.Json but my model uses a property in the json to determine the runtime type of the object from a common base type
. This article mentions that new instances are always created but that custom converters can populate an existing instance but I can
't find how to do that anywhere
.
https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft?pivots=dotnet-7-0#populate-existing-objects
Migrate from Newtonsoft.Json to System.Text.Json - .NET
Learn how to migrate from Newtonsoft
.Json to System
.Text
.Json
. Includes sample code
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
62,338
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
❔ Problem populating Datagrid
C
C# / help
3y ago
Populating IOptions in integration tests
C
C# / help
5mo ago
❔ link getting generated while populating table.
C
C# / help
3y ago
List to double[][] and populating the array
C
C# / help
4y ago