converting sql ResultSet to json