I'm wondering if there will be "race conditions" if I use the dropbox api to read and write json. There are no individual users - authorization is via access token. When a user comes to the site, they'll type in their name and take a quiz. When they click submit at the end of the quiz, the user's name and score will be saved to a master json file. My plan was to do this by reading the file, appending the user info, then overwriting the entire file.
Would it be possible for there to be data loss doing it this way? Say User A and User B both read the file at pretty much the same time. User A writes then User B writes and so User A's info is lost. How do I prevent this from happening?