❔ JsonSerializer serializes list as if its entries were empty
The data inside my List<(string, int)> looks fine but whenever I try to serialize it and save it to a file, I get empty lines. What am I doing wrong?
4 Replies
your list entries are tuples, there isn't a representation for that in json. You can write a custom serializer or replace your list entries with a type that can be represented in json.
I see, thanks :)
should do nicely 🙂
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.