我正在使用System.Text.Json包中的JsonSerializer. inspialize(json)方法在C#中读取一个SON文件JSON文件包含以下 node textClasses:
"textClasses": {
"callout": {
"fontSize": 29,
"fontFace": "Roboto Regular",
"color": "#5158A7"
},
"title": {
"fontSize": 12,
"fontFace": "Roboto Regular",
"color": "#5A6066"
},
"header": {
"fontSize": 11,
"fontFace": "Roboto Light",
"color": "#5A6066"
},
"label": {
"fontSize": 11,
"fontFace": "Roboto Light",
"color": "#5A6066"
}
},
由于我们在textClasses node 下有变量子根名称(别名、标题、标题、标签),我应该如何定义我的C#项目中的类 struct ?