❔ parse a single json property differently

So i have an existing json model that i cannot retire because some users already use it. I want to be able to parse a single property inside that json model 2 ways, the old way and the new way. how would i do that? Property and model in question: https://github.com/Pusheon/Mewdeko/blob/main/src/Mewdeko/Common/NewEmbed.cs#L70
GitHub
Mewdeko/NewEmbed.cs at main · Pusheon/Mewdeko
Mewdeko. Contribute to Pusheon/Mewdeko development by creating an account on GitHub.
6 Replies
Angius
Angius2y ago
STJ or Newtonsoft?
SylveonDeko
SylveonDeko2y ago
newtonsoft i may switch to stj tho, people say its better
Angius
Angius2y ago
Faster for sure And it's not a 3rd party dependency That said, for Newtonsoft, you can define a custom serializer for a single property: https://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_JsonConverterAttribute.htm
SylveonDeko
SylveonDeko2y ago
unfortunately i cant dodge that last point sincce the lib im using includes it anyway hmm i just realized its a lot more complicated lol since the Components property will be severely different hmm
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
What am I doing wrong in Clean Architecture?I got this .sln with seperation of concerns and i have an API that is supposed to fetch string data ❔ Release mode garbage collection is much longer than debug modeI built a WPF app, and to test the lag, i'm just selecting a ListBoxItem and moving my mouse up and ❔ Getting the cookies and current Url from Webview [MAUI]I'm making a simple app where the user needs to log in the first time they're using it in WebView anWhat is the difference between these two methods? Using params or just doing everything in one class```cs public static void Main(string[] args) { int a = 2, b = 3; int sum = Add(a, b) } public s❔ How do I pull information out of a function with alot of information?**I'm getting an error in the below statement SPECIFICALLY at keySet with the error "the name 'keySe❔ Single UDP Broadcaster to Multiple ClientsI'm trying to have a single UDP Broadcast to many clients. This is what I have working so far. Idea❔ how to logout specific user with identityserverI am trying to logout an specific user from previous identity user sessions, so what could I do to ❔ The type 'Attribute' is defined in an assembly that is not referenced.On a dotnet 7 xunit template, I added specflow and the title error pops upHow do I create a class with an array within it?I'm trying to create a class for people with an array of hobbies within it, but cannot figure out ho❔ EF Core - Select items such that attribute sum is greater than...Hi everyone, I have an object Recording having attributes start_time and size_byte. Now, when the s