phil-t
05/06/2022, 3:22 PM"types": {
"10003327": {
"typeNumber": 11,
"classNumber": 335,
"display": 0,
"max": "2000",
"name": "My type"
}
},
The number 10003327
could be different in each response. If I was to use the data classes below I think it would work only for this example, but in another response with a different number it wouldn’t work:
data class Response(
val types: NumberType
)
data class NumberType(
@JsonProperty("10003327") val typeField: Type
)
data class Type(
val typeNumber: Int,
val classNumber: Int,
val display: Int,
val max: String,
val name: String
)
Is there a way to deserialise this completely when you don’t know what the number of the field will be, maybe with another annotation?christophsturm
05/06/2022, 3:29 PMphil-t
05/09/2022, 9:03 AM