Ex: In the company where I work put a lot of data in my code that does not need to be in the database, but it is not actually text or content. They are a lot of validations and depending on the clause it returns a certain type of content, the problem is that everything is in the same file, which is very difficult to read code, usually in these cases I like to leave the data in a JSON file and just take what's necessary leaving the source code leaner.
Is this practice correct? What would be best?