converts mysql to json via jdbc and gson.