title: create a json data object in java
body: <p>Can someone provide me java code to create a json object as shown below </p>
  
  <pre><code> {"main":[
         ["one","two","three","four","five"],
         ["one","two","three","four","five"],
         ["one","two","three","four","five"],
         ["one","two","three","four","five"],
         ["one","two","three","four","five"]
  ]}
  </code></pre>
  
  <p>I have tried something like </p>
  
  <pre><code>        Gson gson = new Gson();
          JsonArray array = new JsonArray();
  
          array.add(new JsonPrimitive("One"));
          array.add(new JsonPrimitive("two"));
          array.add(new JsonPrimitive("three"));
          array.add(new JsonPrimitive("four"));
          array.add(new JsonPrimitive("five"));
  
          JsonObject jsonObject = new JsonObject();
          jsonObject.add("main", array);
  </code></pre>
  
  <p>I am getting the result like below even when I am looping</p>
  
  <pre><code>{"main":["one","two","three","four","five"]} 
  </code></pre>
  
  <p>like a single object. But I am expecting the result like</p>
  
  <pre><code>{"main":[
         ["one","two","three","four","five"],
         ["one","two","three","four","five"],
         ["one","two","three","four","five"],
         ["one","two","three","four","five"],
         ["one","two","three","four","five"]
  ]}
  </code></pre>
  
  <p>Many thanks in advance.</p>