title: Add List<String> to the JSONArray
body: <p>I am trying to greate JSON  with the JSON library. At the momant I am creating JSONArray to add to add all the value in my List to it but I am facing this  Problem </p>
  
  <blockquote>
    <p>he method put(int, boolean) in the type JSONArray is not applicable for the arguments (String, List)</p>
  </blockquote>
  
  <p>at this line <code>arrivalMoFr.put("mon-fri", timeEntries);</code> How can I add List to the <code>JSONArray</code>?</p>
  
  <p>I appreciate any help.</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>    List&lt;String&gt; timeEntries = entry.getValue();
  
      try {
          JSONObject timeTable = new JSONObject();
          timeTable.put("route", route);
  
          JSONObject info = new JSONObject();
          info.put("direction", direction);
  
          JSONObject stops = new JSONObject();     
          stops.put("stops_name", key);
  
          JSONObject arrivals = new JSONObject();
          JSONArray arrivalMoFr  = new JSONArray();
                          //The error is here.
          arrivalMoFr.put("mon-fri", timeEntries);
  
          arrivals.put("mon-fri", arrivalMoFr);
  
          stops.put("arrival_time", arrivals);
  
  
          info.put("stops", stops);
          timeTable.put("info", info);
  
          System.out.println(timeTable.toString(3));
  
  
      }
  </code></pre>
  
  <p><strong>Edit:</strong>
  I added it like this but I am getting now this result:</p>
  
  <pre><code>JSONObject arrivals = new JSONObject();
                  JSONArray arrivalMoFr  = new JSONArray();
                  arrivalMoFr.put( timeEntries);
  
                  arrivals.put("mon-fri", arrivalMoFr);
  </code></pre>
  
  <p><strong>Result:</strong></p>
  
  <pre><code>{
     "route": "4",
     "info": {
        "stops": {
           "arrival_time": {"mon-fri": [[
              "05:04",
              "18:41",
              "19:11",
              "19:41",
              "20:11"
           ]]},
           "stops_name": "Heiweg "
        },
        "direction": "Groß Grönau"
     }
  }
  </code></pre>