These JSON multiple-choice questions and their answers will help you strengthen your grip on the subject of JSON. You can prepare for an upcoming exam or job interview with these JSON MCQs.
So scroll down and start answering.
A. name = "value"
B. name = 'value'
C. name' : 'value'
D. "name" : "value"
A. True
B. False
A. A collection of name/value objects, and an ordered list of objects, or array.
B. A collection of name/value pairs, and an ordered list of values, or array.
C. A collection of native-value pairs, and an ordered list of arrays, or values.
D. A collection of object/item pairs, and an ordered list of pairs, or array.
A. JSONTokener
B. JSONParser
C. ParserJ
D. JParser
A. It controls spacing in the resulting JSON string
B. It is an optional parameter
C. All three statements are false
D. It removes whitespace
A. True
B. False
A. Octal and hexadecimal
B. Octal and binary
C. Binary and hexadecimal
D. Octal and gate
A. JSON.eval()
B. eval()
C. jQuery.parseJSON()
D. JSON.parse()
A. JSON Parsing
B. JSON Procedures
C. JSON with padding
D. JSON Programming
A. They are not permitted.
B. They are stored as strings and then converted when parsed.
C. They are stored fine but it's the parsers job to convert them to numeric values.
A. JSON.parse('');
B. JSON.parse(null);
C. JSON.parse();
D. JSON.parse({});
A. TypeError
B. SyntaxError
C. ReferenceError
D. EvalError
A. Parsing JSON is noticeably faster than parsing XML
B. Faster transfer times over the internet
C. Web apps have a smaller footprint
A. {"x":{"Monday":true,"Wednesday":true,"Sunday":false}}
B. {"day":{"Monday":"true","Wednesday":"true","Sunday":"false"}}
C. {"day":{"Monday":true,"Wednesday":true,"Sunday":false}}
D. {"x":["Monday":true,"Wednesday":true,"Sunday":false]}
A. When JSON is not offered.
B. Never, JSON is worlds better.
C. When you need to use tags to structure your content.
D. You need message validation or you're using XSLT.
A. It is used to quickly create JSON text.
B. It quickly converts JSON to Java strings.
C. It is used to create JSON ordered pairs.
D. It is used to create number strings in JSON.
A. {"Orange"}
B. { "fruit" : "Apple"}
C. {"Apple"}
D. { "fruit" : "Orange"}
A. Strings, Arrays, Primitives and Objects
B. Strings, Arrays, and Primitives
C. Strings only
D. Arrays, Primitives, and Objects stored as strings
A. {"x":"apple"}
B. {"fruit":"orange"}
C. {"x":"orange"}
D. {"fruit":"apple"}
A. / or {
B. < or >
C. ; or :
D. “ or \
A. {"cars":["Ford","Toyota","BMW"]}
B. {"x":["Ford","Toyota","BMW"]}
C. {"x":['Ford','Toyota','BMW']}
D. {"x":{"Ford","Toyota","BMW"}}
A. double quote
B. single quote
C. single quote or double quote
A. Yes, only within strings.
B. No, it will be stripped out.
C. Yes, only outside of strings.
D. Yes, both inside and outside of strings
A. A comma
B. A colon
C. A space
D. A semicolon
A. True
B. False
A. Infiniti
B. Undefined
C. NaN
D. Null
A. Future proofing JSON as JavaScript changes.
B. Size constraints of JSON
C. Cross-domain communication
A. No, JSON has no support for any kind of character encoding.
B. Yes, JSON has support for Unicode characters. Allowing for almost any information in any human language
C. Yes, only when stored as the key in a ( key : value ) pair.
D. No, JSON only has support for UTF-8 characters.
A. Number
B. String
C. March 8, 2011
D. Date
A. String
B. Director
C. Object
A. JSON.toString()
B. JSON.serialize()
C. JSON.stringify()
D. JSON.text()
A. application/json
B. application/javascript
C. text/json
D. application/x-json
A. JSON.parse('{}');
B. JSON.parse(null);
C. JSON.parse(undefined);
D. JSON.parse('[]');
A. undefined
B. null
C. marketing
D. sales
A. False, JavaScript must be available although it is not necessary to use.
B. True, though all browsers have JavaScript enabled.
C. False, JSON is language independent.
D. True, though JavaScript is readily available in today's browsers.
A. JSON.parse("({'FirstName': 'John', 'LastName':'Doe'})");
B. JSON.parse('({"FirstName": "John", "LastName":"Doe"})');
C. JSON.parse('{"FirstName": "John", "LastName":"Doe"}');
D. JSON.parse("{'FirstName': 'John', 'LastName':'Doe'}");
A. JSON namespaces can be accessed immediately after receiving data.
B. JSON doesn't have namespaces. Though every object is inherently a namespace.
C. JSON namespaces can be accessed after parsing data.
A. Plain-text
B. XML
C. SQL
D. ASCII
A. [ {"meals" : { "breakfast" , "lunch" , "dinner" } } ]
B. { "meals" : [ "breakfast" , "lunch" , "dinner" ] }
C. { "meals" : { "breakfast" , "lunch" , "dinner" } }
D. [ "meals" : { "breakfast" , "lunch" , "dinner" } ]
A. It allows an object to determine its own JSON representation
B. All three statements are true
C. It is internally called by JSON.stringify()
D. It customizes JSON stringification behavior
A. Sales, Marketing
B. String
C. Array
D. Object
A. A function that will be called for every key and value at every level of the final result
B. Used to reform generic objects into instances of pseudo-classes
C. Each value will be replaced by the result of the reviver function
D. All three statements are true
A. white space
B. semi-colon
C. line break
D. comma
A. A lightweight data-interchange format. JavaScript Object Notation.
B. A lightweight database framework. JavaScript Object Notation.
C. A lightweight data-interchange format. Java Objective Notion.
D. A lightweight data-encoding framework. Java Omnipresent Notation.
A. Key
B. Object
C. There are none.
D. Value
A. If null or omitted, all properties of the object are included in the resulting JSON string
B. If a function, transforms values and properties encountered while stringifying
C. If an array, specifies the names of the properties in the object to include in the resulting JSON string
D. All three statements are true
A. String
B. type
C. Object
D. Director
A. { 'letters' : {"a", "b", "c" } }
B. { "letters" : [ "a", "b", "c" ] }
C. { "letters" : [ a, b, c ] }
D. { "letters" : [ "a", "b", "c"; ] }
A. { }, "0", false, 0
B. { }, hello, "false", "0"
C. "{ }", "a string", "false", "0"
D. [ ], 0, "true", "0"
A. JavaScript Object Notation
B. JavaScript Objective Notation
C. JavaScript Object Nomenclature
D. JavaScript Orientated Nomenclature