Two keys, one hole with Argo

Imagine you have this struct:

struct Image {  
    let url : NSURL
    let description : String?
    let size : CGSize

And the JSON coming from the server:

 url: "http://myimage.jpg",
 height: 115,
 description: "What an awesome image",
 width: 154

In this particular case we want to build our CGSize from two distinct keys. Since Argo doesn't provide this out of the box, I added a small function to it:

infix operator <|~ { associativity left precedence 150 }

public func <|~ <A where A: Decodable, A == A.DecodedType>(json: JSON, decodable: A.Type) -> Decoded<A> {  
    return A.decode(json)

And then you use it like this:

static func decode(j: JSON) -> Decoded<Image> {  
   return Image.create
    <^> j <| "url"
    <*> j <|? "description"
    <*> j <|~ CGSize.self

Hopefully the Operators police won't see this.