Json file creation

How we add multiple user info in Json file

( we use only 1 { } bracket or multiple { } for different users.

1 Like


Use different {} bracket seperated by a comma.


is showing a syntax error, pls help me to find

Yes it is syntax error,
From this code what I understand is you are trying to overwrite some json file(already in your system) by a string name data.
But string can’t be serialised into JSON.
You have to use dictionary (i.e key and value pair)

Please Try this concept