So I have been working on JSON files over the past few days, just to understand how C# can manipulate JSON.
I need some help with adding a property to a JSON file. I have figured out how to edit values through trial and error, however, I had assumed that it would create the path where I access the value. Turns out this isn't the case.
This is what I currently have done with regards to access a values Height and Width, however, there is no "externalSite""Weblogin""window" path within the JSON
string widthBox = Width.Text.ToString();
string heightBox = Height.Text.ToString();
string CustomSizejson = File.ReadAllText(DownloadConfigFilelocation);
JObject CustomSizeobj = JObject.Parse(CustomSizejson);
CustomSizeobj["externalSite"]["webLogin"]["window"] = "height=" + heightBox + ",width=" + widthBox + ",resizable,scrollbars";
string CustomSizenewJson = CustomSizeobj.ToString();
File.WriteAllText(DownloadConfigFilelocation, CustomSizenewJson);
This is pretty much what I want to accomplish and append it to the JSON file
Can someone help me figure this out? Thanks

