I interpret your question something like this: You want to generate JSON files at runtime and write them to your resources
folder.
This is not how it is supposed to work – the resources
folder is used to contain non-sourcecode files that are used by the program but are included in the distribution, like a Spring application context XML file.
If you want to exchange data with other programs (possibly written in other languages) you should probably use a common exchange directory outside of your program's source tree.