❔ Convert JSON string to struct
I have a string in JSON format. How can I convert it to a struct?
4 Replies
You can use
System.Text.Json
to do the deserialization, but I'm not sure it works with structsHow to serialize and deserialize JSON using C# - .NET
Learn how to use the System.Text.Json namespace to serialize to and deserialize from JSON in .NET. Includes sample code.
It worked, thank you. @🌈 Thinker 🌈
For anyone who needs:
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.