Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Weather App with Swift Managing Complexity Review: Managing Complexity

Stephen Printup
seal-mask
.a{fill-rule:evenodd;}techdegree
Stephen Printup
UX Design Techdegree Student 45,252 Points

Option for specifying that arrays and dictionaries are created as mutable objects

When creating a JSON object, we’ve passed in 0 or nil for the options parameter of

NSJSONSerialization.JSONObjectWithData(data: options: error:) The option for specifying that arrays and dictionaries are created as mutable objects are . Hint: Check the documentation

I did, if you look here: https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSJSONSerialization_Class/index.html#//apple_ref/occ/clm/NSJSONSerialization/JSONObjectWithData:options:error: it says it's of type NSJSONReadingOptions when you click through, under JSONObjectWithData. A constant that reads: "Specifies that arrays and dictionaries are created as mutable objects." is MutableContainers, but MutableContainers doesn't work in the quiz. Any help would be great, thank you.

The answer: NSJSONReadingMutableContainers

I found the answer in the Xcode documentation

Stephen Printup .. Welcome and thanks .. I put it in the Answer area , but the website post it as a comment

1 Answer

The answer: NSJSONReadingMutableContainers

I found the answer in the Xcode documentation