🧪 JSON MCQ Quiz Hub

JSON Multiple choice Questions

Choose a topic to test your knowledge and improve your JSON skills

JSON name/value pair is written as





✅ Correct Answer: 4

JSON strings have to be in





✅ Correct Answer: 2

In the below notation, Employee is of type { “Employee”: [ “Amy”, “Bob”, “John” ] }





✅ Correct Answer: 2

Which of the following is not a JSON type?





✅ Correct Answer: 2

Which of these is correct about the JSON standard?





✅ Correct Answer: 1

What is the file extension of JSON?





✅ Correct Answer: 4

In modern websites what is the common usage for JSON?





✅ Correct Answer: 2

Which of the following code will return a valid JSON object?





✅ Correct Answer: 4

Which of these is proper a JSON array?





✅ Correct Answer: 4

In the below notation, Employee is of type { “Employee”: { “Name”: “Amy”, “Age”: 25 } }





✅ Correct Answer: 1

Which answer represents the following order of TYPES? Object, String, Boolean, Number





✅ Correct Answer: 3

In this example, what is the TYPE of employee? { “employee” : { “type” : “Director”, “functions” : [‘sales’, ‘marketing’] } }





✅ Correct Answer: 4

Given this JSON example: { “Employee”: { “Name”: “Amy”, “Age”: 25 } }; What is the type of Employee.Age ?





✅ Correct Answer: 1

Which of these is a benefit JSON has over XML?





✅ Correct Answer: 2

What does JSON stand for?





✅ Correct Answer: 3

JSON elements are separated by





✅ Correct Answer: 3

What keywords are reserved in JSON and cannot be used as keys?





✅ Correct Answer: 3

Which of the following is a valid JSON string?





✅ Correct Answer: 2

Which of the following code will throw an error?





✅ Correct Answer: 3

Which statement about the toJSON method is true?





✅ Correct Answer: 3

Which of these data interchange formats has seen a decline in usage in favor of JSON?





✅ Correct Answer: 4

True or false? A disadvantage of JSON is that it requires the use of JavaScript.





✅ Correct Answer: 1

Which is true about JSON namespacing?





✅ Correct Answer: 3

What kind of format is JSON, and what does the acronym mean?





✅ Correct Answer: 2

Can you use a double quote inside a JSON string?





✅ Correct Answer: 3

In this example, what is the TYPE of employee.functions? { “employee” : { “type” : “Director”, “functions” : [‘sales’, ‘marketing’] } }





✅ Correct Answer: 3

Which statement about the reviver parameter in JSON.parse() is true?





✅ Correct Answer: 1

Which statement about the reviver parameter in JSON.parse() is true?





✅ Correct Answer: 1

What function will convert a JavaScript object to a JSON string?





✅ Correct Answer: 4

In this example, what would the VALUE of employee.functions[1] be? { “employee” : { “type” : “Director”, “functions” : [‘sales’, ‘marketing’] }





✅ Correct Answer: 3

What is the MIME type of JSON?





✅ Correct Answer: 3

In this example, what is the VALUE of employee.type? { “employee” : { “type” : “Director”, “functions” : [‘sales’, ‘marketing’] }





✅ Correct Answer: 3

In this example, what would the TYPE of employee.hireDate be? { “employee” : { “type” : “Director”, “functions” : [‘sales’, ‘marketing’], “hireDate” : “March 8, 2011” } }





✅ Correct Answer: 2

What is JSONP meant to mitigate?





✅ Correct Answer: 2

Which of these is supported as a JSON Value type?





✅ Correct Answer: 2

When coding a string object in JSON, what must separate the string and the value?





✅ Correct Answer: 4

Does JSON support Unicode characters? A.





✅ Correct Answer: 3

What is the value of obj in the following code? var obj = JSON.parse(‘{“fruit”: “Apple”}’, function(k, v) { if (v == “Apple”) return “Orange” else return v; });





✅ Correct Answer: 2

In what situation would you want to use XML over JSON?





✅ Correct Answer: 3

What is a JSONStringer used for?





✅ Correct Answer: 1

Which of the following control characters cannot be used when writing a JSON string without escaping?





✅ Correct Answer: 2

What is the value of json in the following code? var days = {}; days[‘Monday’] = true; days[‘Wednesday’] = true; days[‘Sunday’] = false; var json = JSON.stringify({x: days});





✅ Correct Answer: 2

How does JSON being “lightweight” translate into a benefit for the site visitors?





✅ Correct Answer: 1

What error does JSON.parse() throw when the string to parse is not valid JSON?





✅ Correct Answer: 3

What two structures is JSON built on?





✅ Correct Answer: 1

Which of the following is not a valid way to parse JSON string?





✅ Correct Answer: 1

Does whitespace matter in JSON?





✅ Correct Answer: 2

What is the value of json in the following code? var cars = []; cars[0] = ‘Ford’; cars[1] = ‘Toyota’; cars[2] = ‘BMW’; var json = JSON.stringify({x: cars});





✅ Correct Answer: 3

What is the value of json in the following code? var obj = { fruit: ‘apple’, toJSON: function () { return ‘orange’; } }; var json = JSON.stringify({x: obj});





✅ Correct Answer: 1

What types of values can you have in JSON key:value pairs?





✅ Correct Answer: 3

What does JSONP stand for?





✅ Correct Answer: 3

Which of the following code will not throw an error?





✅ Correct Answer: 2

How does JSON handle numeric values that cannot be represented by a sequence of digits (like Infiniti and Nan)?





✅ Correct Answer: 2

Which of the following number formats are not used in JSON?





✅ Correct Answer: 4

What is used by the JSONObject and JSONArray constructors to parse JSON source strings?





✅ Correct Answer: 1

Which statement about the space parameter in JSON.stringify() is false?





✅ Correct Answer: 3

JSON stands for ________________





✅ Correct Answer: 2

Which is correct format of writting JSON name/value pair





✅ Correct Answer: 4

Which of the following is not a type in JSON?





✅ Correct Answer: 1

Who is the Father of JSON ?





✅ Correct Answer: 1

. The MIME type of JSON is -





✅ Correct Answer: 1

JSONP stands for -





✅ Correct Answer: 4

__________is not a valid way to parse JSON string.





✅ Correct Answer: 2

Which of the following code will throw an error?





✅ Correct Answer: 3

JSON elements are separated by the -





✅ Correct Answer: 3

Which of following statement is false about the space parameter in JSON.stringify() ?





✅ Correct Answer: 3

What extension in used to save a JSON file?





✅ Correct Answer: 1

Can you use a double quote inside a JSON string?





✅ Correct Answer: 3

. For What is a JSONStringer used for?





✅ Correct Answer: 4

What are two main structures compose JSON?





✅ Correct Answer: 2