haxpor/Potatso

Initializer for conditional binding must have Optional type, not '[Rule]'

Opened this issue · 3 comments

gxzmf commented

issue-1
issue-11

same here, have you resolve this?

same issues

Change line 65:

        if let parsedObject = Mapper<Rule>().mapArray(JSONArray: rulesJSON as! [[String : Any]]){

to

        if let parsedObject:[Rule] = Mapper<Rule>().mapArray(JSONArray: rulesJSON as! [[String : Any]]){

Change line 255

                if let parsedObject = Mapper<T>().mapArray(JSONArray: JSONToMap as! [[String : Any]]){

to

                if let parsedObject:[T] = Mapper<T>().mapArray(JSONArray: JSONToMap as! [[String : Any]]){