you can do it with a dynamic object
dynamic obj = JsonConvert.DeserializeObject<ExpandoObject>(jsonString);
obj.Values.valueName4 = "value4";
System.Console.WriteLine(JsonConvert.SerializeObject(obj));
Posted chucklu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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));
以上是关于Adding property to a json object in C#的主要内容,如果未能解决你的问题,请参考以下文章
Adding a prefix header to an iOS project
Adding an interactive living pivot table to Excel wtih Python
Adding a Timepicker to jQuery UI Datepicker
Laravel文档阅读笔记-Adding a Markdown editor to Laravel
Adding ASP.NET Identity to an Empty or Existing Web Forms Project