[英]C# Json deserialize - property as variable
I have problem.我有问题。 From json: https://api.csgofast.com/price/all I would like to get property name as variable.
来自 json: https : //api.csgofast.com/price/all我想将属性名称作为变量。 Can I do it with Newtonsoft Json library?
我可以用 Newtonsoft Json 库来做吗? Thanks in advance for help.
预先感谢您的帮助。
您可以将此 JSON 反序列化为Dictionary<string, decimal>
如下所示:
var prices = JsonConvert.DeserializeObject<Dictionary<string, decimal>>(json);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.