How to properly serialize tuple as key dictionary

前端 未结 2 1035
一生所求
一生所求 2021-01-19 21:39

I have the following app that shows that the key part of a Dictionary is not sent to JsonConverter, but it is called ToString() on. This is an issu

2条回答
  •  暖寄归人
    2021-01-19 22:22

    Based on the information you have provided, I would suggest that instead of using a Tuple as your key, use a custom struct or object and override the ToString method. Then you can serialize/deserialize as you wish.

提交回复
热议问题