title: Retrofit/Moshi: Platform class java.util.Date requires explicit JsonAdapter to be registered
body: <p>I'm new to Android/Retrofit and Moshi.  I'm trying to make a POST call to my API and I have a problem with serialising <code>Date</code>. If you see anything else that needs correcting, please point it out as I'm still learning. Thanks</p>
  <pre><code>interface ApiInterface {
      @Headers(&quot;token: ${Config.API_TOKEN}&quot;, &quot;Content-Type: application/json&quot;)
      @POST(&quot;/api/signup&quot;)
      fun signUpNoEmail(@Body userInfo: UserInfo) : Call&lt;SignUpJson&gt;
  }
  
  object ApiService {
      private val SERVICE : ApiInterface
      init {
          val retrofit = Retrofit.Builder()
              .baseUrl(Config.BASE_URL)
              .addConverterFactory(MoshiConverterFactory.create())
              .build()
          SERVICE = retrofit.create(ApiInterface::class.java)
      }
  
      fun signUpNoEmail(userInfo: UserInfo) : Call&lt;SignUpJson&gt; = SERVICE.signUpNoEmail(userInfo)
  </code></pre>
  <p><strong>SignUpJson.kt</strong></p>
  <pre><code>@JsonClass(generateAdapter = true)
  data class SignUpJson(val vpn_code: String, val expiry_date: Date)
  @JsonClass(generateAdapter = true)
  data class UserInfo(val username: String)
  </code></pre>
  <p><strong>MainActivity:</strong></p>
  <pre><code>val userInfo = UserInfo(username = deviceId)
  ApiService.signUpNoEmail(userInfo).enqueue(object : Callback&lt;SignUpJson&gt; {
              override fun onResponse(
                  call: Call&lt;SignUpJson&gt;,
                  response: Response&lt;SignUpJson&gt;
              ) {
                  response.let { serverResponse -&gt;
                      if (serverResponse.isSuccessful) {
                          
                      }
                  }
              }
  
              override fun onFailure(call: Call&lt;SignUpJson&gt;, t: Throwable) {
  
              }
          })
  </code></pre>
  <blockquote>
  <p>Caused by: java.lang.IllegalArgumentException: Unable to create
  converter for class SignUpJson</p>
  <p>Caused by: java.lang.IllegalArgumentException: Platform class
  java.util.Date requires explicit JsonAdapter to be registered</p>
  </blockquote>