Serialize value of property only
Given this code:
https://dotnetfiddle.net/C3Pt3C
How would I only serialize the value of the "TempType" rather than the whole object?
C# Online Compiler | .NET Fiddle
Test your C# code online with .NET Fiddle code editor.
13 Replies
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
I should've made the example better
C# Online Compiler | .NET Fiddle
Test your C# code online with .NET Fiddle code editor.
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Sorry
C# Online Compiler | .NET Fiddle
Test your C# code online with .NET Fiddle code editor.
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Why wouldn't I?
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
I understand that, but I thought combining the JsonPropertyName + Value of the variable would be possible
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
It can be done with a custom JsonConverter
I'm doing it another way, thx 🙂