How to deserialize an array of values with a fixed schema to a strongly typed data class?

后端 未结 3 804
夕颜
夕颜 2020-11-22 16:58

I am having some trouble figuring out a clean (as possible) way to deserialize some JSON data in a particular format. I want to deserialize the data to strongly typed data

3条回答
  •  无人及你
    2020-11-22 17:26

    A good way to get started would be to let visual studio generate your class based on the JSON. Open a blank class file and go to EDIT -> PASTE SPECIAL -> PASTE JSON As CLASSES.

    This will generate a file with the necessary class(es) to serialize/deserialize your JSON.

提交回复
热议问题