Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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