title: How to generate random number and export it as JSON?
body: <p>I was planning to generate a random number and export it as JSON using <code>json-simple</code>. I have the following code</p>
  
  <pre><code>public class Main implements JSONAware{
  
      private final int data;
  
      public Main(int data){
          this.data = data;
      }
  
  
      public String toJSONString(){
          StringBuffer sb = new StringBuffer();
  
          sb.append("[");
  
          sb.append(data);
  
          sb.append("]");
          sb.append(",");
  
  
          return sb.toString();
      }
  
      public static void main(String[] args){
  
          JSONArray da = new JSONArray();
  
  
          Random generator = new Random();
          int [][] grid;
  
          grid = new int[128][14];
  
          for (int row = 0; row &lt; 128; row++){
              for (int col = 0; col &lt; 14; col++){
                  grid[row][col] = generator.nextInt(100);
  //                da.add("%d",grid[row][col]);
                  da.add(grid[row][col]);
              }
  //            System.out.println();
          }
          System.out.println(da);
  
      }
  </code></pre>
  
  <p>This prints as following:</p>
  
  <p><code>[9,62,6,60,29,28,59,56,67,61,53,23,22,31,15,96,94,85,65,94,15,7,91,...]</code></p>
  
  <p>but I was trying to print it as </p>
  
  <pre><code>[9,62,6,60,29,28,59,56,67,61,53,23,22,31,15,96,94,85,65,94,15,7,91,...],
  [68,48,40,44,47,85,8,43,17,78,35,7,77,26,80,34,19,47,17,0,59,5,79,...],
  .
  .
  .
  </code></pre>
  
  <p>can anyone tell me how would I split the row from column?</p>