//string 转 泛型类
string styleValue = "[{'Text':'蓝色列表','Value':'D_Default'},{'Text':'详情页','Value':'D_Detail'}]";

JavaScriptSerializer Serializers = new JavaScriptSerializer();
                List<Select> sv = new List<Select>();
                sv = Serializers.Deserialize<List<Select>>(styleValue);

//string 转json
JObject jo = (JObject)JsonConvert.DeserializeObject(styleValue);
    public class Select
    {
        private string _Text;
        private string _Value;

        public string Text { get => _Text; set => _Text = value; }
        public string Value { get => _Value; set => _Value = value; }
    }

相关文章:

  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-12
  • 2022-12-23
  • 2021-06-22
相关资源
相似解决方案