code: public String toJsonString() {
          JSONArray dataArray = new JSONArray();
          JSONArray jsonArray = new JSONArray();
          for (Collection<LabeledItem<T>> col : data) {
              JSONArray itemArray = null;
              for (LabeledItem<T> item : col) {
                  itemArray = new JSONArray();
                  itemArray.put(item.getLabel());
                  itemArray.put(item.getValue());
                  jsonArray.put(itemArray);
              }
              if (itemArray != null) {
                  dataArray.put(jsonArray);
                  jsonArray = new JSONArray();
              }
          }
  
          return dataArray.toString();
      }
docs: /* (non-Javadoc)
  @see br.com.digilabs.jqplot.data.ChartData#toJsonString()