title: I'm creating a serializable class exactly as the others but, Mark the class as @Serializable or provide the serializer explicitly
body: <p>I am trying to get a response from api and the Serialization it's not working, but it made the exactly the same with others data classes and they worked.</p>
  <p>I am using ChangeFieldValueRequest data class as body to send with the request, as body, but i am receiving this message:</p>
  <p>Failure(kotlinx.serialization.SerializationException: Serializer for class 'ChangeFieldValueRequest' is not found.
  Mark the class as @Serializable or provide the serializer explicitly.)</p>
  <pre><code>@Serializable
  data class ChangeFieldValueRequest&lt;T&gt;(
      @SerialName(&quot;commercial_premise_id&quot;) val commercialPremiseId: Int,
      val field: String,
      val value: T
  )
  </code></pre>
  <p>data class response</p>
  <pre><code>package com.quicktendr.mgmt.shared.domain
  
  import kotlinx.serialization.Serializable
  
  @Serializable
  data class StatusResponse(
      val status: String,
      val error: String?
  )
  </code></pre>
  <p>request:</p>
  <pre><code>suspend fun &lt;T&gt; updateLocalField(
          token: String, body: ChangeFieldValueRequest&lt;T&gt;
      ): StatusResponse {
          val request = handleError&lt;StatusResponse&gt; {
              httpClient.post(&quot;${baseUrl}api/management/updateLocalField&quot;) {
                  this.body = body
                  headers.append(HttpHeaders.ContentType, ContentType.Application.Json)
                  headers.append(&quot;Authorization&quot;, &quot;Bearer $token&quot;)
              }
          }
          when (request) {
              is ApiResult.Success -&gt; {
                  return request.value
              }
              is ApiResult.Error -&gt; throw request.throwable
          }
      }
  
  
  protected val httpClient: HttpClient = ServiceLocator.provideKtorHttpClient()
  fun provideKtorHttpClient(): HttpClient {
          if(ktorHttpClient == null) {
              ktorHttpClient = HttpClient(generatePlatformHttpEngine()) {
                  install(JsonFeature) {
                      serializer = KotlinxSerializer(Json {
                          encodeDefaults = true
                          ignoreUnknownKeys = true
                          isLenient = true
                      })
                      accept(ContentType.Application.Json)
                  }
                  install(Logging) {
                      logger = Logger.DEFAULT
                      level = LogLevel.ALL
                  }
              }
          }
  
          return ktorHttpClient!!
      }
  </code></pre>
  <p>gradle cofiguration :</p>
  <pre><code>plugins {
      kotlin(&quot;multiplatform&quot;)
      kotlin(&quot;plugin.serialization&quot;)
  ...
  }
  
     // kotlinx.serialization
      private const val ktxSerializationVersion = &quot;1.0.1&quot;
  
     // ktor
      private const val ktorVersion = &quot;1.4.2&quot;
  
      val ktxSerializationJson = &quot;org.jetbrains.kotlinx:kotlinx-serialization-json:$ktxSerializationVersion&quot;
  
  
   val ktorSerialization = &quot;io.ktor:ktor-client-serialization:$ktorVersion&quot;
  </code></pre>
  <p>I have to send this on body:</p>
  <pre><code>{
      &quot;commercial_premise_id&quot;: 95,
      &quot;field&quot;:&quot;delivery_paused&quot;,
          &quot;value&quot;: true
  }
  </code></pre>
  <p>And the response body will be this:</p>
  <pre><code>{
    &quot;status&quot;: &quot;ok&quot;,
    &quot;error&quot;: null
  }
  </code></pre>