Last active
August 29, 2015 14:27
-
-
Save simonwhitaker/611dab6e3eed016edac5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Error: Cannot invoke 'JSONObjectWithData' with an argument list of type '(NSData, options: Int)' | |
NSJSONSerialization.JSONObjectWithData(data!, options: 0) | |
// Error: Type 'NSJSONReadingOptions' does not conform to protocol 'NilLiteralConvertible' | |
NSJSONSerialization.JSONObjectWithData(data!, options: nil) | |
// This works, but having to pass in 'rawValue' just feels hacky | |
NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions(rawValue: 0)) | |
// I'd expect to be able to do something like: | |
NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.None) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment