     ///
     /// - Parameter mir: mirror
     /// - Returns: dic
-    func getResultFromMirror(mir : Mirror) -> [String:AnyObject] {
-        var result: [String:AnyObject] = [:]
-        if let superMirror = mir.superclassMirror { //便利父类所有属性
-            result = getResultFromMirror(mir: superMirror)
-        }
-        if (mir.children.count) > 0  {
-            for case let (label?, value) in (mir.children) {
-                //属性：label   值：value
-                if let jsonValue = value as? JSON { //如果value实现了JSON，继续向下解析
-                    result[label] = jsonValue.toJSONModel()
-                }
-            }
-        }
-        return result
-    }
+//    func getResultFromMirror(mir : Mirror) -> [String:AnyObject] {
+//        var result: [String:AnyObject] = [:]
+//        if let superMirror = mir.superclassMirror { //便利父类所有属性
+//            result = getResultFromMirror(mir: superMirror)
+//        }
+//        if (mir.children.count) > 0  {
+//            for case let (label?, value) in (mir.children) {
+//                //属性：label   值：value
+//                if let jsonValue = value as? JSON { //如果value实现了JSON，继续向下解析
+//                    result[label] = jsonValue.toJSONModel()
+//                }
+//            }
+//        }
+//        return result
+//    }
     
     /// 将数据转成可用的JSON模型
     func toJSONModel() -> AnyObject? {
         let mirror = Mirror(reflecting: self)
         if mirror.children.count > 0  {
-            let result = getResultFromMirror(mir: mirror)
+//            let result = getResultFromMirror(mir: mirror)
+            var result: [String:AnyObject] = [:]
+            getResultFromMirror(mir: mirror, action: { (label, value) in
+                //属性：label   值：value
+                if let jsonValue = value as? JSON , label != nil { //如果value实现了JSON，继续向下解析
+                    result[label!] = jsonValue.toJSONModel()
+                }
+            })
             return result as AnyObject?  //有属性的对象，返回result是一个dic
         }
         return self as AnyObject?  //基础数据类型，返回自己

    func codablePropertieValues() -> [String:AnyObject] {
        var codableProperties = [String:AnyObject]()
        let mirror = Mirror(reflecting: self)
        codableProperties = getPropertieValuesWithMirror(mir: mirror)
        return codableProperties
    }
    
    //遍历所有的属性列表，将所有的属性存储到数组中
    func getPropertiesWithMirror(mir : Mirror) -> [String] {
        var result: [String] = []
        if let superMirror = mir.superclassMirror {
            result = getPropertiesWithMirror(mir: superMirror)
        }
        for case let (label?, _) in (mir.children) {
            result.append(label)
        }
        return result
    }
    
    //遍历所有的属性列表，将所有的属性存储到数组中
    func codableProperties() -> [String] {
        var codableProperties = [String]()
        let mirror = Mirror(reflecting: self)
        codableProperties = getPropertiesWithMirror(mir: mirror)
        return codableProperties
    }
    
    

    
    public required init?(coder aDecoder: NSCoder) {
        super.init()
        let arr = allProperties()
        for key in arr {
            let object = aDecoder.decodeObject(forKey: key)
            self.setValue(object, forKey: key)
