Been trying to get this to work in Swift 2.0, the error says:
Type NSJSONWritingOptions cannot conform to protocol NilLiteralConvertible
let options = prettyPrinted ? NSJSONWritingOptions.PrettyPrinted : NSJSONWritingOptions(rawValue: 0)
is the right syntax for swift 2.0