11.) How do you identify invalid JSON in a web application?
A) Use a linter or formatter tool
B) Use the browser’s developer tools
C) Log errors in the console
D) All of the above
12.) Which of the following methods can help trace JSON parsing errors in JavaScript?
A) console.parse()
B) try…catch blocks around JSON.parse()
C) JSON.log()
D) window.debug()
13.) What does a JSON path debugger do?
A) Beautifies JSON
B) Validates JSON syntax
C) Extracts specific values from JSON
D) Converts JSON to CSV
14.) Which tool can convert a JSON file into a different format like CSV?
A) jq
B) JSONLint
C) Postman
D) JSON Formatter
15.) What is the primary function of JSON.stringify(value, replacer, space)?
A) Beautifies JSON output
B) Compresses JSON output
C) Converts JSON to XML
D) Converts an object to a string with formatting options
16.) How can you identify unused keys in a JSON object?
A) JSONLint
B) Static analysis tools or manual comparison
C) Postman
D) JSON Formatter
17.) How can you debug a failing JSON API request in a browser?
A) Check the network tab in developer tools
B) Use console.log for JSON output
C) Validate the response JSON using a linter
D) All of the above
18.) What is the result of running JSON.parse(‘{“key”:value}’) in JavaScript?
A) A key-value pair object
B) null
C) SyntaxError: Unexpected identifier
D) ReferenceError
Related