nainesh suthar

nainesh suthar

  • NA
  • 17
  • 544

Make Json String C#

Apr 1 2020 5:22 PM
I made a Json file in C# using the following:
var json2 = new {__meta = new Dictionary<string, object> { { "serviceInterfaceVersion", "1.0.0" }}};
var paylod2 = JsonConvert.SerializeObject(json2, Newtonsoft.Json.Formatting.Indented);
This will create json like
{ "__meta": {"serviceInterfaceVersion": "1.0.0"}}
Now i want made following json file how i do
{  "__meta": { "serviceInterfaceVersion": "1.0.0" },
    "folderName": "..\\dm"
}
So, please guide me, thanks.
Nainesh

Answers (4)