 // SOFTWARE.
 //
 
+import JASON
+
+precedencegroup JASONPrecedence {
+    associativity: right
+    higherThan: AssignmentPrecedence
+}
+
 // MARK: - The <| operator
 
-infix operator <| {
-associativity right
-precedence 90
-}
+infix operator <| : JASONPrecedence
+
 
 /// Assigns the value if it is present and convertible to T
-public func <| <T: Any>(inout lhs: T, json: JSON) {
+public func <| <T: Any>( lhs: inout T, json: JSON) {
     if let value = json.object as? T {
         lhs = value
     }
 }
 
 /// Assigns the value if it is present and convertible to T
-public func <| <T: Any>(inout lhs: T?, json: JSON) {
+public func <| <T: Any>( lhs: inout T?, json: JSON) {
     if let value = json.object as? T {
         lhs = value
     }
 }
 
 /// Assigns the value if it is present and convertible to T
-public func <| <T: Any>(inout lhs: T!, json: JSON) {
+public func <| <T: Any>( lhs: inout T!, json: JSON) {
     if let value = json.object as? T {
         lhs = value
     }


// MARK: - The <? operator

infix operator <? {
associativity right
precedence 90
}

/// Assigns the value or nil if not present/convertible to T
public func <? <T: Any>(inout lhs: T?, json: JSON) {
    lhs = json.object as? T
}

/// Assigns the value or nil if not present/convertible to T
public func <? <T: Any>(inout lhs: T!, json: JSON) {
    lhs = json.object as? T
}

// MARK: - The <! operator

infix operator <! {
associativity right
precedence 90
}

/// Assigns the value or a default value if not present/convertible to T
public func <! <T: Any>(inout lhs: T, json: JSON) {
    if let value = json.object as? T ?? JSON.defaultValueFor(T.self) {
        lhs = value
    }
}

/// Assigns the value or a default value if not present/convertible to T
public func <! <T: Any>(inout lhs: T?, json: JSON) {
    if let value = json.object as? T ?? JSON.defaultValueFor(T.self) {
        lhs = value
    }
}

/// Assigns the value or a default value if not present/convertible to T
public func <! <T: Any>(inout lhs: T!, json: JSON) {
    if let value = json.object as? T ?? JSON.defaultValueFor(T.self) {
        lhs = value
    }
}

            return nil
        }
    }
}
