Home > Software engineering >  Unable to Write json variable c# getting an error
Unable to Write json variable c# getting an error

Time:05-13

I get an error when I try to serialize or update a json file. I just want to update the value of "balance" inside a json file and I got the idea enter image description here

CodePudding user response:

you have a bug

  File.WriteAllText(Login.jsonResponse, json);

instead of ogin.jsonResponse you have to use a file path

File.WriteAllText(<full file path\Users.json>, json);
  • Related