我有一组数据(键值对)需要映射到 json,注意键不固定,键名不固定。谢谢,例如
如何映射
dict<string, list<string>>
{"Module",new List<String>(){"Allprice"}},
{"Code",new List<String>(){"PA0000606", "PA0000669"}},
{"ContinuosForwardPeriod", new List<string>() {"0"} ,
{ "TimeStampID", new List<string>{"0"},
{"PriceTypeID": "8"}
到
[
{ "Module": "Allprice",
"Code": "PA0000606",
"ContinuosForwardPeriod": "0",
"TimeStampID": "0",
"PriceTypeID": "8"
},
{ "Module": "Allprice",
"Code": "PA0000669",
"ContinuosForwardPeriod": "0",
"TimeStampID": "0",
"PriceTypeID": "8"
}
]