The following code returns json for Google chart
public static DataTable generateDataTable(){
        // Create a data table,
        DataTable data = new DataTable();
        ArrayList cd = new ArrayList();
        cd.add(new ColumnDescription("name", ValueType.TEXT, "Animal name"));
        cd.add(new ColumnDescription("link", ValueType.TEXT, "Link to wikipedia"));
        cd.add(new ColumnDescription("population", ValueType.NUMBER, "Population size"));
        cd.add(new ColumnDescription("vegeterian", ValueType.BOOLEAN, "Vegetarian?"));
        data.addColumns(cd);
        // Fill the data table.
        try {
          data.addRowFromValues("Aye-aye", "http://en.wikipedia.org/wiki/Aye-aye", 100, true);
          data.addRowFromValues("Sloth", "http://en.wikipedia.org/wiki/Sloth", 300, true);
          data.addRowFromValues("Leopard", "http://en.wikipedia.org/wiki/Leopard", 50, false);
          data.addRowFromValues("Tiger", "http://en.wikipedia.org/wiki/Tiger", 80, false);
        } catch (TypeMismatchException e) {
          System.out.println("Invalid type!");
        }
        return data;
}
public static void main(String []args){
    String json = JsonRenderer.renderDataTable(generateDataTable(), false, false).toString();
    System.out.println(json);
}
But the returned JSON
{cols:[{id:'name',label:'Animal name',type:'string',pattern:''},{id:'link',label:'Link to wikipedia',type:'string',pattern:''},{id:'population',label:'Population size',type:'number',pattern:''},{id:'vegeterian',label:'Vegetarian?',type:'boolean',pattern:''}]}
is not valid when pasted into http://jsonlint.com/
Also what is the pattern value that shows up in the returned json {id:'name',label:'Animal name',type:'string',**pattern:''**}
 
     
    