I need to make a POST request to my backend with following json:
{
    start_time: 123456789
}
I have created the below data class for the body in Retrofit request:
data class MyRequestBody(
    @Json(name="start_time")
    val startTime: Long
)
But when I check on my backend the request contains the startTime field instead of start_time. How can I change the name of this variable for json serialization?
Edit: My build.gradle:
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-moshi:2.9.0"
My api interface:
internal interface RemoteTopicApi {
    @POST("xyz/")
    suspend fun getData(@Body body: MyRequestBody)
}
Retrofit Builder:
Retrofit.Builder()
    .baseUrl(BASE_URL)
    .addConverterFactory(MoshiConverterFactory.create())
    .build()
 
    