Please enable JavaScript.
Coggle requires JavaScript to display documents.
Methods of Data Exchange (Maciek, 2024) - Coggle Diagram
Methods of Data Exchange (Maciek, 2024)
JSON
Pros
- Less bulky then XML, therefore easier to parse
- More widely adopted in SQL than XML and CSV
- Supports Nested/Hierarchal data
- Lower learning curve then XML
- Python has the JSON module in its library (json.loads()), which directly turns a JSON string into a python dictionary/list.
Cons
- Can be slower to parse than CSV but not XML
- Not as many data types as XML, this could produce less precise data and inconsistent data formats (eg for a date, 08/03/02025 and 2025-08-04)
CSV
Pros
- Can hold larger datasets then JSON or XML due to their compact structure
- Best for tabular data i.e. they fit into excel and google sheets nicely
- Because of their compact size they are easier to parse
Cons
- Unsuitable for hierarchal data (which is data that only relates to a single key (in JSON) in a given dataset), so if a dataset requires a lot of these ‘nested’ values then csv becomes inefficient
- Commas are used to separate values, so if commas are used frequently could create confusion when reading the dataset
- Due to its tabular nature, no custom fields can be added, so any specific information to one event will have to be for all if it is required.
XML
Cons
- Bigger and bulkier than JSON and CSV, therefore it takes more time to parse, which could frustrate some users
- Inefficient for simpler data exchange applications due to its wordy syntax and larger size. The wordy syntax makes it difficult to understand, initial coding could be made more difficult due to this.
Pros
- Allows for wide range of data types, could help with specific data fields
- Supports nested/hierarchal data
- Access to Extensible Stylesheet Language Transformations (XSLT), which transforms XML documents into HTML format, plain text etc.