Skip to content

Commit

Permalink
Add <| operators for JSONObject? and [JSONObject]?
Browse files Browse the repository at this point in the history
  • Loading branch information
derrh committed Dec 14, 2016
1 parent c98a3a1 commit c5e907e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/Operators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ public func <| <A: RawRepresentable>(dictionary: MarshaledObject, key: String) t
public func <| (dictionary: MarshaledObject, key: String) throws -> JSONObject {
return try dictionary.value(for: key)
}
public func <| (dictionary: MarshaledObject, key: String) throws -> JSONObject? {
return try dictionary.value(for: key)
}
public func <| (dictionary: MarshaledObject, key: String) throws -> [JSONObject] {
return try dictionary.value(for: key)
}
public func <| (dictionary: MarshaledObject, key: String) throws -> [JSONObject]? {
return try dictionary.value(for: key)
}

0 comments on commit c5e907e

Please sign in to comment.