Is there a way to convert a Java object to a JSON file (I have an array of objects and I want to export it to a JSON file, properties)>
Of course, I suggest you try the Google API , which provides a good way to insert in series / deserialize data from java objects to JSON and vice versa.
Here you can find the relevant answers. Go through it.
JsonParser Java JSON, .