What are the problems encountered in the encapsulation of swift json to model, generalization?

   
 //let rootModel = Mapper<RootClass>().map(JSONString: jsonString);  

static func modelWithJSONFile(fileName:String) -> AnyObject? {

    let jsonString = fileName.jsonFileToJSONString();
    let rootModel = Mapper<self.classForCoder()>().map(JSONString: jsonString);
    return rootModel;
}


func jsonFileToJSONString() -> String {
    assert(self.contains(".geojson") == true);
    
    if self.contains(".geojson") == true {
        let array: Array = self.components(separatedBy: ".");
        let path = Bundle.main.path(forResource: array.first, ofType: array.last);
        if let jsonData = try? Data(contentsOf: URL(fileURLWithPath: path!)) {
            
            if let jsonObj = try? JSONSerialization.jsonObject(with: jsonData, options: JSONSerialization.ReadingOptions(rawValue: 0)) {
                let jsonString = ((jsonObj as! NSDictionary).JSONValue()!).removingPercentEncoding!;
                print(jsonString);
                return jsonString;
            }
            return "";
        }
        return "";
    }
    return "";
}



May.25,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eae554-21c9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eae554-21c9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?