❔ 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
Angius3y ago
STJ or Newtonsoft?
SylveonDeko
SylveonDekoOP3y ago
newtonsoft i may switch to stj tho, people say its better
Angius
Angius3y 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
SylveonDekoOP3y 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 User3y 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