Because missions.json
consists of an array of Mission
objects, as indicated by the fact that the outer brackets are square:
[
{
"id": 1,
"crew": [
{
"name": "grissom",
"role": "Command Pilot"
},
{
"name": "white",
"role": "Senior Pilot"
},
{
"name": "chaffee",
"role": "Pilot"
}
],
"description": "..."
},
{
"id": 7,
"launchDate": "1968-10-11",
"crew": [
{
"name": "schirra",
"role": "Commander"
},
{
"name": "eisele",
"role": "Command Module Pilot"
},
{
"name": "cunningham",
"role": "Lunar Module Pilot"
}
],
"description": "..."
},
etc...
]
While astronauts.json
consists of a dictionary of String
keys and Astronaut
objects, as indicated by the fact that the outer brackets are curly:
{
"grissom": {
"id": "grissom",
"name": "Virgil I. \"Gus\" Grissom",
"description": "..."
},
"white": {
"id": "white",
"name": "Edward H. White II",
"description": "..."
},
etc...
}