medium
Single Answer
0Which is an advantage in using JSON over a CSV file?
Answer Options
A
Values can be used that contain spaces.
B
There are multiple values for a particular key.
C
The files can be read line by line for every value.
D
Hierarchical structure allows for programmability.
Correct Answer: D
Explanation
JavaScript Object Notation (JSON) allows for a hierarchical structure that allows for programmability; this is somewhat similar to Extensible Markup Language (XML). Both JSON and comma-separated values (CSV) can contain spaces, because the values are enclosed within double quotes. Both JSON and CSV can have multiple values for a particular key. Only CSV can be read line by line; JSON files must be read in their entirety.
json
csv
data-formats
comparison