Skip to content

Download data: JSON file format

JavaScript Object Notation (JSON) is a text-based format to store arbitrary object structures. It can be read by a variety of programming languages, making it the most versatile option for data analysis.

When to use JSON

JSON is ideal when you need to:

  • Work with hierarchical or nested data (e.g., the Tree structure)
  • Process data programmatically in Python, R, JavaScript, or other languages
  • Preserve the full structure of your experiment data
  • Access all available variables and metadata

For simple tabular data that you want to open in a spreadsheet, CSV may be more convenient.

Compatible data structures

JSON format is available for these data structures:

Loading JSON data

import json
from pprint import pprint

# Load the JSON file
with open('Meadows_myStudy_tree.json') as data_file:
    data = json.load(data_file)

# Display the data structure
pprint(data)
library(jsonlite)

# Load the JSON file
data <- fromJSON('Meadows_myStudy_tree.json')

# Display the data structure
str(data)

For MATLAB, install the JSONLab toolbox and use:

data = loadjson('Meadows_myStudy_tree.json')  % replace with your filename
const fs = require('fs');

// Load the JSON file
const data = JSON.parse(fs.readFileSync('Meadows_myStudy_tree.json', 'utf8'));

// Display the data
console.log(data);