title: Does Retrofit support passing JSON as parameter, yet call it as normal parameters?
body: <h2>Background</h2>
  <p>On some API calls to the server, instead of the normal parameters to the interface, like this:</p>
  <pre><code>interface SomeInterface {
      @POST(&quot;first_launch&quot;) fun sendFirstLaunch(
          @Path(&quot;referral_code&quot;) referralCode: String?,
          @Path(&quot;referral_source&quot;) referralSource: String?): Call&lt;BaseDCResponse&gt;
  }
  </code></pre>
  <p>We actually need to send those parameters as a JSON in the body.</p>
  <h2>The problem</h2>
  <p>I'm not an expert in Retrofit, but according to what I've found (<a href="https://www.semicolonworld.com/question/44764/how-to-post-raw-whole-json-in-the-body-of-a-retrofit-request" rel="nofollow noreferrer">here</a> for example), I can only pass a Json String to the interface, meaning:</p>
  <pre><code>interface SomeInterface {
      @POST(&quot;first_launch&quot;) fun sendFirstLaunch(@Body jsonString: String): Call&lt;BaseDCResponse&gt;
  }
  </code></pre>
  <p>According to <a href="https://stackoverflow.com/a/39660682/878126">here</a>, I believe I can also send a serialized object, instead. Meaning something like:</p>
  <pre><code>interface SomeInterface {
      class SendFirstLaunchRequest(@Path(&quot;referral_code&quot;) val referralCode: String?,
          @Path(&quot;referral_source&quot;) val referralSource: String?)
  
      @POST(&quot;first_launch&quot;) fun sendFirstLaunch(
          @Body body: SendFirstLaunchRequest): Call&lt;BaseDCResponse&gt;
  }
  </code></pre>
  <p>This loses the nice way to reach the function, while making me add the Json data manually for each function I put on the interface (or create new classes to pass there). I want to avoid this, and have something similar to the original.</p>
  <h2>What I've tried</h2>
  <p>I tried to search more and more about this, but it doesn't seem like this was requested.</p>
  <p>Maybe I saw the answers but didn't understand them.</p>
  <p>I think even the official website shows some clues about this:</p>
  <p><a href="https://square.github.io/retrofit/" rel="nofollow noreferrer">https://square.github.io/retrofit/</a></p>
  <p>Seeing that I don't think it's possible, I've also added a request for it <a href="https://github.com/square/retrofit/issues/3522" rel="nofollow noreferrer">here</a>.</p>
  <h2>The questions</h2>
  <ol>
  <li><p>Does Retrofit allow to send the parameters I set to the function, to be a Json data as a body?</p>
  </li>
  <li><p>If not, is there any nice workaround for this? Am I correct that I could only pass a serialized object instead? If so, what's the proper way to do it? Maybe like <a href="https://stackoverflow.com/questions/21398598/how-to-post-raw-whole-json-in-the-body-of-a-retrofit-request">here</a>?</p>
  </li>
  </ol>