troubleshooting Question

C# Windows app updating JSON file error.

Avatar of Spike UK
Spike UKFlag for United Kingdom of Great Britain and Northern Ireland asked on
C#JSON* compiler
9 Comments1 Solution491 ViewsLast Modified:
I am writing a application that reads and updates a JSON file.
I can read it OK but when I try to updaed it, I get the following error:
Severity      Code      Description      Project      File      Line      Suppression State
Error      CS0656      Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'

The code I am using to update is:

 public bool SetSystemOptions(int MinRxLThreshold, ref string messag)
            SysSettings SysSetting;
            bool Success = true;
            string json = File.ReadAllText("settings.json");
            dynamic jsonObj = Newtonsoft.Json.JsonConvert.DeserializeObject(json);
            jsonObj[0]["Password"] = "new password";
            string output = Newtonsoft.Json.JsonConvert.SerializeObject(jsonObj, Newtonsoft.Json.Formatting.Indented);
            File.WriteAllText("settings.json", output);

            return Success;
Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros