 }
 
 
+//MARK:- Equatable
+
+extension JSONPath: Equatable {
+
+}
+
+
+public func ==(lhs: JSONPath, rhs: JSONPath) -> Bool {
+    return lhs.components == rhs.components
+}
+
+
+extension JSONPath.Component: Equatable {
+
+    private func asTuple()-> (text: String?, number: Int64?, isSelfReference: Bool) {
+        switch self {
+        case .Text(let text):
+            return (text, nil, false)
+        case .Numeric(let number):
+            return (nil, number, false)
+        case .SelfReference:
+            return (nil, nil, true)
+        }
+    }
+}
+
+
 public func ==(lhs: JSONPath.Component, rhs: JSONPath.Component) -> Bool {
+
     let lhsValues = lhs.asTuple()
     let rhsValues = rhs.asTuple()
 

}


public func ==(lhs: JSONPath, rhs: JSONPath) -> Bool {
    return lhs.components == rhs.components
}



        }
    }
}
