Here you can find the source of getNumber(ResultSet rs, String name)
public static String getNumber(ResultSet rs, String name)
//package com.java2s; //License from project: Open Source License import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static String getNumber(ResultSet rs, String name) { try {// w w w. ja va 2 s. c om return "\"" + name + "\":" + rs.getLong(name) + ""; } catch (SQLException ex) { return "\"" + name + "\":\"error\""; } } }