Adding property to a json object in C#

Adding property to a json object in C#

 

you can do it with a dynamic object

        dynamic obj = JsonConvert.DeserializeObject<ExpandoObject>(jsonString);
        obj.Values.valueName4 = "value4";
        System.Console.WriteLine(JsonConvert.SerializeObject(obj));

 

How to add an extra property into a serialized JSON string using json.net?

上一篇:创建应用程序源包AWS Elastic Beanstalk


下一篇:mysql 导出数据报错: row must be in range 0-65535