I am starting my studies in Java. For this reason I am not very familiar with libraries and methods that exist Java. I would like to understand if there is any way of catching an object of type ResultSet, as the the return of a query made as follows:
The ResultSet rs_Tbl_CONTROL_SYNCHRONISM =
con.query("Select * From DB_EGLISE.Tbl_CONTROL_synchronism;");
After obtaining ResultSet, is there any way to transform the output to JSON format? Is there a library, or some other method that will do this for me?
I noticed a few question similar to my however none of them will respond fully my doubts, must understand how to do in JAVA to transform the return of a ResultSET Object all to JSON, in response found on site, I noticed that it is necessary to inform each field returned, but do not know which fields will return to be a dynamic program, i.e. every time I will make a query. How should I proceed through this fault ? The GSON makes this ? And how do ?