21.) What error occurs if you try to parse the following JSON?
'{"name": "Alice", "age": 25,}'
A) Trailing comma error
B) Type error
C) Key missing error
D) No error, valid JSON
22.) What is the result of parsing this JSON string?
'{"key1": "value1", "key2": [1, 2, value3]}'
A) value3 is ignored
B) JSON is parsed successfully
C) value3 is converted to a string
D) Syntax error due to value3
23.) What will happen if you try to parse this JSON?
A) Syntax error due to missing value
B) The missing value is converted to null
C) The JSON is parsed successfully
D) The missing value is ignored
24.) What will happen when parsing the following JSON?
'{"key1": "value1", {"key2": "value2"}}'
A) The second object is ignored
B) JSON is parsed successfully
C) Syntax error due to misplaced object
D) key2 is treated as a nested key
25.) What is the output of parsing this JSON?
'{"key": "value" "key2": "value2"}'
A) {“key”: “value”, “key2”: “value2”}
B) Syntax error due to missing comma
C) {“key”: “valuekey2”: “value2”}
D) Null is assigned between the keys
Related