C
C#6mo ago
SWEETPONY

✅ how to convert Dictionary to C# object?

I have Dictionary<string, object> map string is property name and object is property value is it possible to deserialize this to real object?
1 Reply
SWEETPONY
SWEETPONYOP6mo ago
I can do this but only with newtonsoft:
var str = JsonConvert.SerializeObject(changes);
var obj = JsonConvert.DeserializeObject<WorkingTaskModel>(str);
var str = JsonConvert.SerializeObject(changes);
var obj = JsonConvert.DeserializeObject<WorkingTaskModel>(str);
Want results from more Discord servers?
Add your server