I've stuck with creating a model to decode JSON file. The structure of the file is presented in the picture:
The problem I faced is decoding versionsListByTeams -> 1155 -> V1.0.4
. For the rest part my model looks like that:
struct Settings: Decodable {
let enabled: Bool
let speed: Double
let connections: Int
let versionsListByHWVersion: [String: HWVersion]; struct HWVersion: Decodable {
let version: String
let binFile: String
let jsonFile: String
}
let versionsListByTeams: [Int: Team]; struct Team: Decodable {
let fotaEnabled: Bool
// [String: HWVersion] <== what should be here?
}
}