skip to Main Content

json string is not converting to model

I have json response as below. {"StatusCode":1,"Data":{"AndroidVersion":"1","IOSVersion":"1"},"Pager":null,"Error":null} Now I want to convert to model where I have string extension as below. func toJSON() -> Any? { guard let data = self.data(using: .utf8, allowLossyConversion: false) else { return nil } return…

VIEW QUESTION
Back To Top
Search