11.) Why should you limit the depth of nested JSON objects?
A) To improve readability
B) To reduce data size
C) To remove duplicate keys
D) To prevent DoS attacks caused by deep recursion
12.) What is the effect of caching JSON responses?
A) Reduces server processing time for repeated requests
B) Increases JSON size
C) Prevents JSON injection attacks
D) Converts JSON to binary format
13.) How can you validate JSON in a secure and efficient way?
A) Use custom regular expressions
B) Use a JSON Schema validator
C) Manually check the JSON
D) Ignore validation for trusted sources
14.) Which type of JSON structure is most efficient for transmitting data?
A) Deeply nested objects
B) Objects with arrays
C) Flat, simple key-value pairs
D) JSON with comments
15.) What is the primary advantage of using binary JSON formats like BSON?
A) Smaller size and faster parsing
B) Enhanced readability
C) Compatibility with XML
D) Automatic validation
16.) How does HTTPS improve the security of JSON data transmission?
A) It makes JSON larger
B) It encrypts JSON data in transit
C) It validates JSON schemas
D) It beautifies JSON responses
17.) What is the potential issue with using eval() to parse JSON strings in JavaScript?
A) Slower parsing
B) Vulnerability to code injection attacks
C) Increased memory usage
D) It cannot parse valid JSON strings
18.) How can JSON responses be protected from being cached by unauthorized users?
A) Use the Cache-Control header with no-store
B) Minify the JSON data
C) Use large nested objects
D) Convert JSON to XML
19.) What is a safe alternative to eval() for parsing JSON in JavaScript?
A) JSON.stringify()
B) JSON.parse()
C) JSON.minify()
D) JSON.debug()
20.) How does JSON web encryption (JWE) enhance JSON security?
A) It adds authentication to JSON
B) It compresses JSON data
C) It encrypts JSON payloads for secure transmission
D) It converts JSON to binary format
Related