Say I have json that looks like this  ```{ "ver...
# serialization
j
Say I have json that looks like this 
Copy code
{
  "versions": {
      "android": {
          "recommended": "2020.06.01",
          "minimum": "2020.05.22"
      },

      "ios": {
          "recommended": "2020.06.01",
          "minimum": "2020.05.22"
      }
  }
}
And I want my model to look like this:
Copy code
@Serializable
data class AppVersions(val recommended: String, val minimum: String)
Does anyone know how to use the Serializer to ignore a layer and look for
versions/android
? Is it as simple as assigning the Serial Name like that?
This is what I chose to do in the interim.
Copy code
@Serializable
data class AppVersions(@SerialName("android") private val platform: MobilePlatform) {
 val recommended get() = platform.recommended
 val minimum get() = platform.minimum
}
@Serializable
data class MobilePlatform(val recommended: String, val minimum: String)
👍 2