I have this dataclass used with Moshi:
@JsonClass(generateAdapter = true)
data class SearchResult(
@field:Json(name = "1. symbol") val symbol: String,
@field:Json(name = "2. name") val name: String,
@field:Json(name = "4. region") val region: String,
)
When I build my application, I have this SearchResultJsonAdapter
generated with a line breaker after 4.
. This line breaker make my code not compilable...
class SearchResultJsonAdapter(
moshi: Moshi
) : JsonAdapter<SearchResult>() {
private val options: JsonReader.Options = JsonReader.Options.of("1. symbol", "2. name", "4.
region")
What can I do to disable line breaking in my JSonAdapter. Many thanks
It was an issue fix after 1.9.3. Using version 1.11.0 in gradle's app helps me to fix this problem: