You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return"\t\tif let value = json[\(key)].array {\n\t\t\t\(variableName) = value\n\t\t}"
359
+
return"\t\tif let tempValue = json[\(key)].array {\n\t\t\t\(variableName) = tempValue\n\t\t}"
360
360
}
361
361
362
362
/**
@@ -378,7 +378,7 @@ public class ModelGenerator {
378
378
*/
379
379
internalfunc initalizerForPrimitiveVariableArray(variableName:String, key:String, var type:String)->String{
380
380
type =typeToSwiftType(type)
381
-
return"\t\t\(variableName) = []\n\t\tif let items = json[\(key)].array {\n\t\t\tfor item in items {\n\t\t\t\tif let value = item.\(type) {\n\t\t\t\t\(variableName)?.append(value)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n"
381
+
return"\t\t\(variableName) = []\n\t\tif let items = json[\(key)].array {\n\t\t\tfor item in items {\n\t\t\t\tif let tempValue = item.\(type) {\n\t\t\t\t\(variableName)?.append(tempValue)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n"
382
382
}
383
383
384
384
/**
@@ -416,7 +416,7 @@ public class ModelGenerator {
416
416
*/
417
417
internalfunc initalize(variableName:String, var type:String, key:String)->String{
418
418
type =typeToSwiftType(type)
419
-
return"\t\tif let value = json[\(key)].\(type) {\n\t\t\t\(variableName) = value\n\t\t}"
419
+
return"\t\tif let tempValue = json[\(key)].\(type) {\n\t\t\t\(variableName) = tempValue\n\t\t}"
0 commit comments