Questions On Json

So what I’m wanting to do Is create a system that stores usernames roles and what these roles can do most likely in json and save this to a database or is it better to save it to a file? how would I go about creating the best practice for a json. Users would be applying the roles through forms how do I get the form values where I add them into the json?

I could also go abut this with having a database table for roles like 0 role1 editor, 1 role2 admin etc but if someone has 100 roles it would need 100 rows in the database like this I assume a json is better way or will just a database query have good function?

Ill also be using this for a members list that could have thousands or more rows if done like this and with more than one page having members the amount of rows in the database would quickly grow would this cause issues?

Hi,
I would think of it this way.
If I have a very small amount of data that almost never changes it would be ok to use json files.

If you on the other hand have large amount of data or need to change the data you should really use a database, databases is designed to handle huge amount of data and are very efficiant doing it. Much faster and better than files in basically every way.

Thanks for this info sounds like I need a database apposed to a json as members could unfollow etc bit like a instagram follow/following system and the roles are assigned by users and created by users