350-401 · Question #1050
350-401 Question #1050: Real Exam Question with Answer & Explanation
The correct answer is C: "class":[ { "title":"Cooking 101", "type":"elective", "session":"fall" } ]. Option C is correctly formatted JSON because it uses proper JSON array syntax with square brackets, contains a valid object enclosed in curly braces, uses correctly quoted key-value string pairs, and - critically - has NO trailing comma after the last property ('session':'fall').
Question
Which JSON script is properly formatted? A. B. C. D.
Options
- A"student":[{ "grade":"9", "ID":"7460059362", "type":"on-line", } ]
- B"plants":[ { "name":"Fern", "color":"green", "type":"indoor", } ]
- C"class":[ { "title":"Cooking 101", "type":"elective", "session":"fall" } ]
- D"class":[ { "title":"History", "grade":"9", "location":"Site 2" } ]
Explanation
Option C is correctly formatted JSON because it uses proper JSON array syntax with square brackets, contains a valid object enclosed in curly braces, uses correctly quoted key-value string pairs, and - critically - has NO trailing comma after the last property ('session':'fall'). Trailing commas after the final key-value pair in a JSON object are a syntax error in strict JSON formatting, which eliminates options A and B. Option D is missing the closing bracket for the array.
Topics
Community Discussion
No community discussion yet for this question.