             }
             return subpath
         })
-    }
-
-    private func buildPath(path: String?) -> String {
-        if let path = path {
-            if self.basePath.count > 0 {
-                return "\(self.basePath).\(path)"
-            }
-            return path
-        }
-        return self.basePath
-    }
-
-    private func buildPath(path: String?, index: Int) -> String {
-        if let path = path {
-            if self.basePath.count > 0 {
-                return "\(self.basePath).\(path)[\(index)]"
-            }
-            return "\(path)[\(index)]"
-        }
-        if self.basePath.count > 0 {
-            return "\(self.basePath)[\(index)]"
-        }
-        return "[\(index)]"
-    }
-
-    private func buildPath(path: String?, key: Any) -> String {
-        if let path = path {
-            if self.basePath.count > 0 {
-                return "\(self.basePath).\(path).\(key)"
-            }
-            return "\(path).\(key)"
-        }
-        if self.basePath.count > 0 {
-            return "\(self.basePath).\(key)"
-        }
-        return "\(key)"
-    }
-
-    private func buildPath(subpaths: [IQJsonPath], from: Int, to: Int) -> String {
-        var path = self.basePath
-        Array< IQJsonPath >(subpaths[from..<to]).forEach({
-            if let string = $0.jsonPathKey {
-                if path.count > 0 {
-                    path.append(".\(string)")
-                } else {
-                    path.append(string)
-                }
-            } else if let number = $0.jsonPathIndex {
-                path.append("[\(number)]")
-            }
-        })
-        return path
     }
 
     private func set(_ value: Any?, subpaths: [IQJsonPath]) throws {

                    }
                    root = mutable
                } else {
                    throw QJsonError.access(path: self.buildPath(subpaths: subpaths, from: 0, to: subpathIndex))
                }
                if subpathIndex == subpaths.endIndex - 1 {
                    if let value = value {

    public func get< Key: IQJsonValue, Value: IQJsonValue >(mandarory: Bool, path: String? = nil) throws -> [Key : Value] {
        let jsonValue: Any = try self.get(path: path)
        guard let jsonDictionary = jsonValue as? NSDictionary else {
            throw QJsonError.cast(path: self.buildPath([ path ]))
        }
        var result: [Key : Value] = [:]
        for jsonItem in jsonDictionary {
            let subpath = self.buildPath([ path, jsonItem.key ])
            let key = try Key.fromJson(value: jsonItem.key, path: subpath) as! Key
            if mandarory == true {
                let value = try Value.fromJson(value: jsonItem.value, path: subpath) as! Value
