 		}
 		
 		self.commons.objectValueBlock = { [weak self] (instance, typeInfo, value, key) -> Void in
-			self?.populateObject(forKey: key, intoInstance: instance, withTypeInfo: typeInfo, withJsonObject: value as! [String : AnyObject])
+			self?.populateObject(forKey: key, intoInstance: instance, withTypeInfo: typeInfo, withObject: value as AnyObject)
 		}
 		
 		self.commons.arrayValueBlock = { [weak self] (instance, typeInfo, value, key) -> Void in
-			self?.populateArray(forKey: key, intoInstance: &instance, withTypeInfo: typeInfo, withJsonArray: value as! [AnyObject])
+			self?.populateArray(forKey: key, intoInstance: instance, withTypeInfo: typeInfo, withJsonArray: value as! [AnyObject])
 		}
 	}
 	

		guard let data = string.data(using: .utf8) else { return nil }
		guard let jsonObject = try! JSONSerialization.jsonObject(with: data, options: options) as? [String: AnyObject] else { return nil }
	
		
		self.setupCommons()
		
		var instance: AnyObject = (getInstance() as T) as AnyObject
		self.commons.populate(instance: &instance, withJsonObject: jsonObject, withConfig: config)
		
		self.unsetupCommons()
		

		return type.init()
	}
	
	fileprivate func populateArray(forKey key: String, intoInstance instance: AnyObject, withTypeInfo typeInfo: TypeInfo, withJsonArray jsonArray: [AnyObject]) {
		var array = [AnyObject]()
		for item in jsonArray {
			if commons.isPrimitiveType(typeInfo.typeName) {
				array.append(item)
			} else {
				let inst: AnyObject = self.getInstance(forType: NSClassFromString(typeInfo.typeName) as! NSObject.Type)
				commons.populate(instance: inst, withObject: item)
				array.append(inst)
			}
		}
		instance.setValue(array, forKey: key)
	}
	
	fileprivate func populateObject(forKey key: String, intoInstance instance: AnyObject, withTypeInfo typeInfo: TypeInfo, withObject object: AnyObject) {
		let propertyInstance = self.getInstance(forType: typeInfo.type as! NSObject.Type)
		commons.populate(instance: propertyInstance, withObject: object)
		instance.setValue(propertyInstance, forKey: key)
	}
}
