title: Retrofit 2 RequestBody JsonArray
body: <p>How can I put a <code>JSONArray</code> into a <code>RequestBody</code> without a runtime exception being thrown?</p>
  
  <pre><code>@Multipart 
  @POST("/call_method")
  Call&lt;MyResponse&gt; callMethod(@Part("token")RequestBody token,@Part("params")RequestBody params);
  </code></pre>
  
  <p>I need to put <code>JSONArray</code> into params. What I currently do:</p>
  
  <pre><code>callMethod(RequestBody.create(MediaType.parse("text/plain"), token),
             RequestBody.create(MediaType.parse("text/plain"), jsonArrayParams));
  </code></pre>
  
  <p>But when I execute this method, I'll get a runtime exception: </p>
  
  <pre><code>com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line
  </code></pre>
  
  <p>And very intersting: The request is executed (check via CharlesProxy) but I can't see it result due to the runtime exception.
  How can I fix this bug?</p>