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 (Retired) Pulling Data From the Web Review: Network Calls and JSON

Paul Harding
Paul Harding
18,822 Points

This question is bad!!! The correct answer collection of key-value pairs and ordered list of values doesn't work.

Anyone get something to work on this question?

8 Answers

Kieran Robinson
Kieran Robinson
9,411 Points

the four answers I chose were

1) Fill in the blanks below A) JSON can be represented by two types of structures - ARRAYS and DICTIONARIES

2) What are some of the advantages of JSON? A) All of the above

3) In the code snippet below, can you indicate what type of method dataWithContentsOfURL() is? var someData = NSData.dataWithContentsOfURL(someURL, options: nil, error: nil) A) Class method

4) What does JSON stand for? A) JavaScript Object Notation

Hope this helps Paul Harding

Thanks.

This is a horrible question for an online quiz. The wikipedia page for JSON reads:

"JSON is built on two structures:

A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.

An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence."

But those answers are not recognized.

Other acceptable answers could be "array" and "object"

The word "dictionary", is used as an example of a possible type in a particular language. ObjectiveC and Swift have Dictionaries, but, other languages have hash tables, or keyed lists.

I would suggest making this a multiple-choice question because of the wide array of possible answers a person could provide.

Benjamin Cichy
Benjamin Cichy
5,289 Points

I would have put key-value, and ordered list as the most likely answers. This questions needs some serious re-working.

indeed u bumped into this question as well.. i thought its "object" and "array" as well

Biagio Messina
Biagio Messina
8,106 Points

Oddly, "dictionaries" followed by "arrays" didn't work, but "arrays" followed by "dictionaries" did.

horrible question, needs fixing

I cant say its a bad question but key pairs and dictionaries are the answer I heard in the video personally. I could under stand how one could rationalize a key pair to get array with some background knowledge but still its probably best to change the question or add to teacher notes an example of key paired array

YI FENG XIE
YI FENG XIE
2,274 Points

bad question +1

the answer what i think actually is key/value