Q:

How add newline between JSON objects?

I want to add a new dictionary to a JSON file each time i run the code and then read and work with that data, but it's written like this on one line:
{"userid": "person_1", "password": "67890", "name": "person1", "age": "21", "email": "gmail"}{"userid": "person_2", "password": "12345", "name": "person2", "age": "19", "email": "gmail"}

I want to write each dictionary in a newline or separate them in another way because I can't read them and convert them to a python dictionary in this way, here is the code:
To write on json file:
users = {"userid": username, "password": password,
             "name": name, "age": age, "email": email}
with open("users.json", "a") as f:
    json.dump(users, f)

and to read them, it gives me an error:
with open("users.json",'r') as f:
    usersinfo = json.load(f)

A:

Write each json to a new line
with open("users.json", "a") as f:
   f.write(json.dumps(users) + '\n')

