Swift try with question mark

Viewed 1745

I see the following in the code maintained by me:

func parse(values: NSMutableDicationary) {
    let data = try? JSONSerialization.data(withJSONObject: values, options: JSONSerialization.WritingOptions())
}

Pay attention that the method does not mark as throwing anything nor does it handle the error. The code does crash the application though.

I am trying to figure out what does try? (try with a question mark) means.

Googling or StackOverflowing did not return any useful info.

So, what does try? mean in Swift?

3 Answers
Related