JSON array to C# Dictionary

后端 未结 6 1338
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-19 14:04

How do I convert a JSON array like this

[{\"myKey\":\"myValue\"},
{\"anotherKey\":\"anotherValue\"}]

to a C# Dictionary wi

6条回答
  •  轮回少年
    2020-12-19 14:21

    The data must to be sent as follows (format):

    "Values": [
      {"Key" : "abc"  , "Value": 23.14},
      {"Key" : "abc1" , "Value": 23.11},
      {"Key" : "abc2" , "Value": 23.17},
      {"Key" : "abc3" , "Value": 23.19}
    ]
    

    thereby, the converting process will work. It worked fine to me in my attempt to convert from JSON to dictionary

提交回复
热议问题