Clearfunda
Simplifying Concepts for Success
Home
English Grammar
Synonyms
Salesforce Certification
Javascript Developer 1
AI Associate
Tech Quiz
HTML
JSON
GK Quiz
Geography
Inventions
Animals
Science
Food and Drinks
Yearly World Affairs
Tech Tools
JSON Formatter
Text Compare
Unit Converter
Favicon Generator
Password Generator
JS Editor
Support Us
JSON Basics
Share it
Time limit:
15:00
End(
)
Practice Test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Question 1 of 20
True or False: JSON is a programming language used for writing web applications.
Choose 1 answer
A. True
B. False
Question 2 of 20
Which of the following best describes the purpose of JSON?
Choose 1 answer
A. A format for exchanging data between a server and web application.
B. A markup language used to design the structure of a webpage.
C. A query language for databases.
D. A protocol for secure data transmission.
Question 3 of 20
Which of the following data types can JSON directly represent?
Choose 3 answers
A. Strings
B. Functions
C. Numbers
D. Booleans
Question 4 of 20
In the following JSON structure, what is the value associated with the key 'age'? { "name": "John", "age": 30, "city": "New York" }
Choose 1 answer
A. "John"
B. 30
C. "New York"
D. None of the above
Question 5 of 20
True or False: In JSON, keys must always be enclosed in double quotes.
Choose 1 answer
A. True
B. False
Question 6 of 20
Which of the following JSON data types can be null?
Choose 1 answer
A. Numbers
B. Objects
C. Strings
D. Null itself
Question 7 of 20
What is the purpose of JSON.stringify() in JavaScript?
Choose 1 answer
A. To convert a JSON string into a JavaScript object.
B. To convert a JavaScript object into a JSON string.
C. To validate a JSON string.
D. To modify a JSON object in place.
Question 8 of 20
Which of the following are valid JSON objects? (Choose all that apply)
Choose 3 answers
A. { "name": "Alice", "age": 25 }
B. { name: "Alice", age: 25 }
C. { "name": "Alice", "age": null }
D. { "name": "Alice", "skills": ["JavaScript", "Python"] }
Question 9 of 20
What is the correct syntax to represent an array in JSON?
Choose 1 answer
A. { "items": 1, 2, 3 }
B. [ "apple", "banana", "cherry" ]
C. ( "one", "two", "three" )
D. { "array": ( 1, 2, 3 ) }
Question 10 of 20
In JSON, what character is used to separate key-value pairs in an object?
Choose 1 answer
A. Comma (,)
B. Colon (:)
C. Semi-colon (;)
D. Equal sign (=)
Question 11 of 20
Which of the following would correctly parse the following JSON string into a JavaScript object? '{"name":"John", "age":30}'
Choose 1 answer
A. JSON.parse('{"name":"John", "age":30}')
B. JSON.stringify('{"name":"John", "age":30}')
C. eval('{"name":"John", "age":30}')
D. JSON.validate('{"name":"John", "age":30}')
Question 12 of 20
True or False: In JSON, you can use single quotes to wrap keys and values.
Choose 1 answer
A. True
B. False
Question 13 of 20
Which of the following are valid JSON keys?
Choose 2 answers
A. "firstName"
B. firstName
C. 'firstName'
D. "1stName"
Question 14 of 20
Which method would you use in JavaScript to convert a JSON object into a string?
Choose 1 answer
A. JSON.parse()
B. JSON.stringify()
C. JSON.encode()
D. JSON.decode()
Question 15 of 20
What will happen if you try to parse an invalid JSON string using JSON.parse() in JavaScript?
Choose 1 answer
A. The function will return undefined.
B. The function will throw a SyntaxError.
C. The function will return null.
D. The function will log an error but continue.
Question 16 of 20
What is the correct JSON format to represent the following object: A user with the name 'Alice', who is 28 years old and has an empty list of skills?
Choose 1 answer
A. { "name": "Alice", "age": 28, "skills": [] }
B. { name: "Alice", age: 28, skills: [] }
C. { 'name': 'Alice', 'age': 28, 'skills': [] }
D. { "name": "Alice", "age": 28, "skills": {} }
Question 17 of 20
Which of the following use cases would benefit from using JSON? (Select all that apply)
Choose 3 answers
A. Sending structured data between a web server and a browser.
B. Defining complex data models in a SQL database.
C. Configuring application settings.
D. Storing real-time event logs.
Question 18 of 20
In which format does the JavaScript function JSON.parse() return data?
Choose 1 answer
A. String
B. JavaScript Object
C. JSON Object
D. Array
Question 19 of 20
Which of the following is a reason to use JSON over XML for data transmission?
Choose 1 answer
A. JSON is less verbose and easier to parse.
B. JSON is compatible with all programming languages.
C. JSON supports namespaces for more complex data structures.
D. JSON offers better support for binary data.
Question 20 of 20
Which of the following is not a valid JSON object?
Choose 1 answer
A. { "firstName": "John", "age": 30 }
B. { 'firstName': 'John', 'age': 30 }
C. { "firstName": "John", "age": null }
D. { "firstName": "John", "age": "30" }
Previous
Next
Submit
Verify Answer
Try Other Sets
Quick Link
About Us
Privacy Policy
Terms & Condition
Query
contact@clearfunda.com
Follow Us
Clearfunda1
Clearfunda
Clearfundaofficial
©
Clearfunda.com
, All Rights Reserved