      
      - returns: An instance of the given type or nil
      */
-    static func defaultValueFor<T: Any>(type: T.Type) -> T? {
+    static func defaultValue<T: Any>(for type: T.Type) -> T? {
         switch type {
         case is String.Type:
             return "" as? T

            return nil
        }
    }
}
// SOFTWARE.
//

import JASON

precedencegroup JASONPrecedence {
    associativity: right
    higherThan: AssignmentPrecedence
}

// MARK: - The <| operator

infix operator <| : JASONPrecedence


/// Assigns the value if it is present and convertible to T
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>( 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>( lhs: inout T!, json: JSON) {
    if let value = json.object as? T {
        lhs = value
    }
