Is there any way to automatically apply naming conventions to Moshi when serializing data using Moshi?
e.g.
I have this class which follows Kotlin naming conventions for properties (camel case)
class Player {
var currentHealth: Int = 100
var firstName = "John"
var lastName = "Doe"
}
I would like to serialize it to something which will stick to the naming conventions we have on the server (snake case):
{
current_health: 100,
first_name: "John",
last_name: "Doe"
}
I already know we can customize column names on each property manually. Just looking for a way to do that automatically (for instance if we add properties to the POJO or on server side).