title: How to Post JSON array using Retrofit 2
body: <p>I need to post an JSON object using Retrofit 2. My JSON object is</p>
  
  <blockquote>
    <p>{
                    "logTime" : "",
                    "datas" : [
                          {
                            "dat1": "1",
                            " dat2": "", 
                            " dat3": "",
                            " dat4": "",
                            " dat5": ""<br>
                          },
                          {
                            "dat1": "1",
                            " dat2": "", 
                            " dat3": "",
                            " dat4": "",
                            " dat5": ""<br>
                          }
    ]}</p>
  </blockquote>
  
  <p>I have tried using following code:</p>
  
  <p>API Services</p>
  
  <pre><code>@FormUrlEncoded
  @Headers({
          "Content-Type: application/json",
          "x-access-token: eyJhbGciOiJIU"
  })
  @POST("/api/employee/checkin")
  Call&lt;String&gt; CHECKIN(@Body String data);
  </code></pre>
  
  <p>Activity Class</p>
  
  <pre><code>JSONStringer jsonStringer = null;
      try {
          jsonStringer=new JSONStringer().object().key("logTime").value("")
                  .key("datas")
                  .array()
                  .object().key("dat1").value("1")
                  .key("dat2").value("3")
                  .key("dat3").value("5")
                  .key("dat4").value("5")
                  .endObject()
                  .endArray()
                  .endObject();
      } catch (JSONException e) {
          e.printStackTrace();
      }
  
      ApiService service = retroClient.getApiService();
  
      Call&lt;String&gt; login = service.CHECKIN(String.valueOf(jsonStringer));
  
      login.enqueue(new Callback&lt;String&gt;() {
          @Override
          public void onResponse(Call&lt;String&gt; call, Response&lt;String&gt; response) {
              dialog.dismiss();
              try {
                  String val = response.body();
  
  
              } catch (Exception e) {
                  e.getMessage();
              }
          }
  
          @Override
          public void onFailure(Call&lt;String&gt; call, Throwable t) {
  
          }
      });
  </code></pre>
  
  <p>I got "Error: No Retrofit annotation found. (parameter #2)" while using this code. Please help me. Thanks in advance.</p>