Disclaimer:
Educational Use Only:
The website links provided are to be used strictly for educational and knowledge-gaining purposes only.
No Misuse:
Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.
Respect for Websites and Businesses:
Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.
Acknowledge Value of Knowledge:
Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.
No Endorsement:
The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.
User Responsibility:
By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.
Overall MCQs for Reference
- What does JSON stand for in data science?
a. JavaScript Original Notation
b. JavaScript Object Notation
c. Java Syntax Object Name
d. JavaScript Object Network
Answer: b. JavaScript Object Notationlearningds+1 - Why is JSON preferred in data science for data exchange?
a. It is binary
b. It is complex and large
c. It is simple, flexible, and human-readable
d. It is encrypted by default
Answer: c. It is simple, flexible, and human-readablelinkedin - Which type of data structure does JSON support for representing data?
a. Only flat tables
b. Hierarchical data with nested objects and arrays
c. Only numeric arrays
d. Only keyless data
Answer: b. Hierarchical data with nested objects and arrayslinkedin - What is a key advantage of JSON over CSV in data science?
a. JSON supports nested data structures
b. JSON is slower to parse
c. CSV supports hierarchical data
d. JSON is binary
Answer: a. JSON supports nested data structureslinkedin - Which Python module is commonly used to work with JSON data?
a. json
b. jsonlib
c. JSONHandler
d. pyjson
Answer: a. jsonrealpython - How are JSON objects structured?
a. As key-value pairs
b. As arrays only
c. As linked lists
d. As sets
Answer: a. As key-value pairsw3schools+1 - Which JavaScript method converts a JSON string into a JavaScript object?
a. JSON.stringify()
b. JSON.parse()
c. JSON.encode()
d. JSON.convert()
Answer: b. JSON.parse()geeksforgeeks - What does the method JSON.stringify() do?
a. Converts JSON object to string
b. Converts string to JSON object
c. Validates JSON syntax
d. Analyzes JSON security
Answer: a. Converts JSON object to stringgeeksforgeeks - Which of the following is NOT a valid JSON data type?
a. String
b. Number
c. Function
d. Boolean
Answer: c. Functiondeveloper.mozilla - What is a typical use of JSON in data science workflows?
a. API data exchange
b. Image rendering
c. Hardware configuration
d. Video streaming only
Answer: a. API data exchangelinkedin - What makes JSON easier to read compared to XML?
a. Minimal syntax and lack of closing tags
b. It uses more complex tags
c. XML is always binary
d. JSON does not need quotes
Answer: a. Minimal syntax and lack of closing tagsbrandmed - Which of these is a limitation of JSON compared to XML?
a. No schema validation built-in
b. Cannot represent hierarchical data
c. Too complex and large file size
d. Only supports binary data types
Answer: a. No schema validation built-inezeelive+1 - Which statement about JSON data size is correct?
a. JSON files are usually larger than equivalent XML files
b. JSON files are compact and typically smaller than XML files
c. JSON files store data in binary
d. JSON files are always encrypted
Answer: b. JSON files are compact and typically smaller than XML filesbrandmed - How do you handle nested JSON objects in Python?
a. Using keys to access nested dictionaries
b. You cannot handle nested JSON in Python
c. By converting JSON into CSV first
d. Using XML parsing libraries
Answer: a. Using keys to access nested dictionariesrealpython - What kind of syntax does JSON use?
a. XML-style tags
b. Key-value pairs separated by colons and commas
c. Indentation only
d. Parentheses only
Answer: b. Key-value pairs separated by colons and commasw3schools - How is an array represented in JSON?
a. With square brackets []
b. With angle brackets <>
c. With curly braces {}
d. With parentheses ()
Answer: a. With square brackets []learningds - Which language is JSON originally based on?
a. Python
b. JavaScript
c. Ruby
d. Java
Answer: b. JavaScriptlearningds - For what reason is JSON widely used in modern applications?
a. It is machine and human-readable, enabling flexible data interchange
b. It requires large memory to process
c. It is the only format databases can store
d. It is a binary format
Answer: a. It is machine and human-readable, enabling flexible data interchangelinkedin - Which is an advantage of JSON in data science?
a. It supports complex data with minimal overhead
b. It requires no parsing
c. XML is always better than JSON
d. It never needs validation
Answer: a. It supports complex data with minimal overheadlinkedin - How do you write JSON keys in terms of string format?
a. Keys must be enclosed in double quotes
b. Keys do not require quotes
c. Keys use single quotes only
d. Keys are numerical only
Answer: a. Keys must be enclosed in double quotesdeveloper.mozilla - What is the output of JSON.parse(‘{“name”:”John”}’) in JavaScript?
a. A string
b. A JavaScript object with key name and value John
c. A JSON string
d. Error
Answer: b. A JavaScript object with key name and value Johngeeksforgeeks - When serializing Python data to JSON, which function is typically used?
a. json.load()
b. json.dump()
c. json.dumps()
d. json.read()
Answer: c. json.dumps()realpython - Which of the following best describes JSON’s file format type?
a. Plain text
b. Binary
c. Encrypted
d. Executable
Answer: a. Plain textlearningds - JSON data can contain which of the following?
a. Nested objects, arrays, strings, numbers, booleans, and null
b. Functions and methods
c. Binary executables
d. Hardware instructions
Answer: a. Nested objects, arrays, strings, numbers, booleans, and nulldeveloper.mozilla+1 - Which method in JavaScript converts JavaScript objects into JSON strings?
a. JSON.parse()
b. JSON.stringify()
c. JSON.toString()
d. JSON.convert()
Answer: b. JSON.stringify()geeksforgeeks - What best describes JSON arrays?
a. Ordered lists of values enclosed in square brackets
b. Unordered key-value pairs
c. A sequence of keys only
d. None of the above
Answer: a. Ordered lists of values enclosed in square bracketslearningds - How does JSON benefit data transfer in web applications?
a. Small file size leads to faster transfer speeds
b. Large file size improves security
c. Encrypted file format reduces latency
d. Requires special hardware to transfer
Answer: a. Small file size leads to faster transfer speedsbrandmed - Which language feature is NOT allowed in JSON format?
a. Strings
b. Numbers
c. Methods or functions
d. Arrays
Answer: c. Methods or functionsdeveloper.mozilla - What is the main purpose of JSON?
a. To facilitate lightweight data exchange between systems
b. To serve as a programming language
c. To encrypt information
d. To store binary data only
Answer: a. To facilitate lightweight data exchange between systemsoracle - Which is a common use of JSON in data science APIs?
a. Exchanging data between client and server
b. Writing low-level assembly code
c. Encrypting user credentials
d. Rendering UI components only
Answer: a. Exchanging data between client and serverlinkedin - How are JSON null values represented?
a. “null” as a string
b. null keyword without quotes
c. 0
d. Empty string “”
Answer: b. null keyword without quoteslearningds - What is the output of JSON.stringify({a:1, b:2}) in JavaScript?
a. “{a:1,b:2}”
b. ‘{“a”:1,”b”:2}’
c. Object {a:1, b:2}
d. Error
Answer: b. ‘{“a”:1,”b”:2}’geeksforgeeks - Why is JSON considered flexible in handling data?
a. Supports hierarchical and nested structures of any depth
b. Supports only flat data structures
c. Does not support arrays
d. Supports only numeric data
Answer: a. Supports hierarchical and nested structures of any depthlinkedin - Which of these is true about performance when comparing JSON and CSV?
a. CSV is generally faster for flat, tabular data
b. JSON is always faster than CSV
c. CSV cannot handle any data format
d. JSON files are binary and compact
Answer: a. CSV is generally faster for flat, tabular datalinkedin - What common programming error should be avoided when handling JSON strings?
a. Forgetting to wrap keys in double quotes
b. Using colons to separate arrays
c. Using commas instead of semicolons
d. Writing strings without quotes
Answer: a. Forgetting to wrap keys in double quotesdeveloper.mozilla - Which data interchange format is JSON often compared against?
a. XML
b. HTML
c. YAML
d. SQL
Answer: a. XMLbrandmed - What tool or function is commonly used to read JSON files in Python?
a. json.load()
b. csv.reader()
c. file.readJSON()
d. xml.parse()
Answer: a. json.load()realpython - What is the structure of a JSON document?
a. A collection of key-value pairs and arrays
b. A series of tag-based nodes
c. Plain text without structure
d. Binary data blocks
Answer: a. A collection of key-value pairs and arrayslearningds - Which of the following data types are supported by JSON?
a. String, Number, Object, Array, Boolean, Null
b. Function and Date
c. Undefined and Symbol
d. Complex numbers
Answer: a. String, Number, Object, Array, Boolean, Nulldeveloper.mozilla+1 - What is a typical first step for handling JSON data in a data science program?
a. Loading or parsing the JSON string into machine-readable format
b. Compressing the JSON data
c. Converting JSON to binary
d. Encrypting the JSON file
Answer: a. Loading or parsing the JSON string into machine-readable formatrealpython - Which of the following is an advantage of JSON in web development?
a. Native integration with JavaScript on browsers
b. Requires special parsers in JavaScript
c. It is slower than XML in every case
d. Only used for server-side applications
Answer: a. Native integration with JavaScript on browserslearningds - How is boolean data represented in JSON?
a. true and false keywords (no quotes)
b. “true” and “false” strings
c. 1 and 0
d. Yes and No strings
Answer: a. true and false keywords (no quotes)learningds - Which of the following tools is commonly used to query JSON data stored in databases?
a. SQL with JSON functions
b. CSS
c. Bash scripting
d. HTML5
Answer: a. SQL with JSON functionslearn.microsoft - What best describes the nature of JSON in terms of human readability?
a. It is human-readable
b. Completely unreadable binary
c. Obfuscated
d. Proprietary format
Answer: a. It is human-readablelearningds - What happens if a JSON document has a syntax error?
a. Parsing will fail and raise an error
b. JSON will auto-correct the error
c. JSON ignores errors silently
d. It converts to XML automatically
Answer: a. Parsing will fail and raise an errorrealpython - What does the JSON key-value pair look like?
a. “key”: value
b. key = value
c. (key, value)
d. key -> value
Answer: a. “key”: valuew3schools - Which of the following is true about JSON arrays?
a. Can contain mixed data types within one array
b. Must contain only one data type
c. Are not allowed to be nested
d. Cannot be empty
Answer: a. Can contain mixed data types within one arraylearningds - For data scientists, what is an important use of JSON for API interactions?
a. To retrieve structured data seamlessly
b. To compile code
c. To perform data encryption
d. To visualize images
Answer: a. To retrieve structured data seamlesslylinkedin - How does JSON handle whitespace characters?
a. Whitespace is ignored when parsing JSON
b. Whitespace is mandatory between keys
c. Whitespace causes errors
d. Whitespace changes the data type
Answer: a. Whitespace is ignored when parsing JSONw3schools - What is the best practice for writing readable JSON files for humans?
a. Use indentation and line breaks via JSON.stringify options
b. Write everything in one long line
c. Skip quotation marks to save space
d. Avoid using arrays
Answer: a. Use indentation and line breaks via JSON.stringify optionscuantum
- https://learningds.org/ch/14/web_json.html
- https://www.geeksforgeeks.org/javascript/json/
- https://www.linkedin.com/pulse/json-handling-data-science-mohamed-chizari-pgj0e
- https://realpython.com/python-json/
- https://www.w3schools.com/js/js_json.asp
- https://www.geeksforgeeks.org/javascript/how-to-create-and-manipulatinag-json-data-in-javascript/
- https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Scripting/JSON
- https://brandmed.com/blog/development/the-power-of-json-whats-behind-the-popularity
- https://ezeelive.com/json-advantages-disadvantages/
- https://www.oracle.com/in/database/what-is-json/
- https://learn.microsoft.com/en-us/sql/relational-databases/json/json-data-sql-server?view=sql-server-ver17
- https://www.cuantum.tech/post/mastering-json-creating-handling-and-working-with-json-files
- https://codefinity.com/blog/Understanding-and-Working-with-JSON-Data
- https://www.snowflake.com/en/blog/automating-snowflakes-semi-structured-json-data-handling/
- https://www.datacamp.com/tutorial/json-data-python
- https://www.linkedin.com/pulse/json-why-use-powerful-reasons-example-nexotips-vj4af
- https://codeinstitute.net/global/blog/what-is-json/
- https://www.turing.com/kb/what-is-json
- https://stackoverflow.blog/2022/06/02/a-beginners-guide-to-json-the-data-format-for-the-internet/
- https://stackoverflow.com/questions/5615352/xml-and-json-advantages-and-disadvantages