🧪 JSON MCQ Quiz Hub

JSON Multiple choice Questions

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

1. JSON name/value pair is written as




2. JSON strings have to be in




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




4. Which of the following is not a JSON type?




5. Which of these is correct about the JSON standard?




6. What is the file extension of JSON?




7. In modern websites what is the common usage for JSON?




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




9. Which of these is proper a JSON array?




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




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




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




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




14. Which of these is a benefit JSON has over XML?




15. What does JSON stand for?




16. JSON elements are separated by




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




18. Which of the following is a valid JSON string?




19. Which of the following code will throw an error?




20. Which statement about the toJSON method is true?




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




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




23. Which is true about JSON namespacing?




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




25. Can you use a double quote inside a JSON string?




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




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




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




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




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




31. What is the MIME type of JSON?




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




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




34. What is JSONP meant to mitigate?




35. Which of these is supported as a JSON Value type?




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




37. Does JSON support Unicode characters? A.




38. 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; });




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




40. What is a JSONStringer used for?




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




42. 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});




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




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




45. What two structures is JSON built on?




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




47. Does whitespace matter in JSON?




48. 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});




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




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




51. What does JSONP stand for?




52. Which of the following code will not throw an error?




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




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




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




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




57. JSON stands for ________________




58. Which is correct format of writting JSON name/value pair




59. Which of the following is not a type in JSON?




60. Who is the Father of JSON ?




61. . The MIME type of JSON is -




62. JSONP stands for -




63. __________is not a valid way to parse JSON string.




64. Which of the following code will throw an error?




65. JSON elements are separated by the -




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




67. What extension in used to save a JSON file?




68. Can you use a double quote inside a JSON string?




69. . For What is a JSONStringer used for?




70. What are two main structures compose JSON?