             return JSONDecodeError.nullValue(baseInfo: baseInfo)
         }
         
-        return JSONDecodeError.typeMismatch(baseInfo: baseInfo, expectType: T.self, actualType: type(of:data),value: data)
+        let extraInfo = ExtraInfo(expectType: T.self, actualType: type(of:data), value: data)
+        return JSONDecodeError.typeMismatch(baseInfo: baseInfo, extraInfo: extraInfo)
     }
 }
 

    public var description: String {
        switch self {
        case .keyNotFound(let baseInfo):
            return errorMessage(messageType: "Key Not Found::", baseInfo: baseInfo,
                                expectType: nil, actualType: nil, value: nil)
        case .nullValue(let baseInfo):
            return errorMessage(messageType: "Null Value Found At:", baseInfo: baseInfo,
                                expectType: nil, actualType: nil, value: nil)
        case .typeMismatch(let baseInfo, let expectType, let actualType,let value):
            return errorMessage(messageType: "Type Mismatch:", baseInfo: baseInfo,
                                expectType: expectType, actualType: actualType, value: value)
        case .specialCase(let reason):
            return reason
        }
    }
}

fileprivate func errorMessage(messageType: String, baseInfo:JSONDecodeError.BaseInfo,
                              expectType: Any?, actualType: Any?, value: Any?) -> String {
    let baseResult:String = [
        "",
        messageType,
        baseInfo.description
    ].joined(separator: "\n")
    guard let expectType = expectType, let actualType = actualType, let value = value else {
        return baseResult
    }
    
    return [
        baseResult,
        "\tExpected Type : \(expectType)",
        "\tActual Type : \(actualType)",
        "\tActual Value : \(value)",
    ].joined(separator: "\n")
}

            ].joined(separator: "\n")
        }
    }
    
    public struct ExtraInfo {
        let expectType:Any
        let actualType:Any
        let value:Any
        var description:String {
            return [
                "\tExpected Type : \(expectType)",
                "\tActual Type : \(actualType)",
                "\tActual Value : \(value)"
            ].joined(separator: "\n")
        }
    }
    
    case keyNotFound(baseInfo:BaseInfo)
    case nullValue(baseInfo:BaseInfo)
    case typeMismatch(baseInfo:BaseInfo,extraInfo:ExtraInfo)
    case specialCase(reason:String)
    
    static public func produceError<T> (targetType:T.Type, json:JSON, key:String) -> JSONDecodeError {
