0%

What is the difference: JSON vs CSV

CSV is a comma-separated values file, where the data is structured as a table. The first row is a header, followed by the values.

JSON is structured differently. Each object (enclosed in curly brackets) contains comma-separated items in a key:value pair, where the key is the “name of the column” and the value is an individual data point that can be a number (e.g., p_value and effect_size), a string (e.g., marker_symbol), or an array (e.g., top_level_mp_term_name). Square brackets indicate an array type.

Example of JSON:

{
  "effect_size":0.100352112676056,
  "marker_symbol":"Prkdc",
  "p_value":0.041044776119403,
  "top_level_mp_term_name":["hearing/vestibular/ear phenotype"]},
{
  "effect_size":-0.333531393149707,
  "marker_symbol":"Prkdc",
  "p_value":0.243160963130514,
  "top_level_mp_term_name":["hematopoietic system phenotype",
    "immune system phenotype"]}

Example of the same CSV:

marker_symbol,top_level_mp_term_name,effect_size,p_value
Prkdc,hearing/vestibular/ear phenotype,0.100352112676056,0.041044776119403
Prkdc,"hematopoietic system phenotype,immune system phenotype",-0.333531393149707,0.243160963130514