This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
Equilibrium index: https://codility.com/demo/results/demo8M3XWQ-TWF/
import Foundation | |
public typealias JSON = AnyObject | |
public func JSONWithData(data: NSData) -> JSON? { | |
do { | |
let j = try NSJSONSerialization.JSONObjectWithData(data, options: []) | |
return j | |
} catch _ { | |
return nil |