[Solved] How to create JSON Codable using Swift [closed]


This is a starting point. The structs are pretty straightforward. If one of the Division arrays is empty – asked in one of your previous questions – the corresponding array is empty, too.

struct Root : Decodable {
    let status : Bool
    let data: DivisionData
}

struct DivisionData : Decodable {
    let school, college, office, organisation, central : [Division]
}

struct Division : Decodable {
    let id, name, date : String
    let group : [String]
}

10

solved How to create JSON Codable using Swift [closed]